mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
fixed buggy resizing
This commit is contained in:
parent
d3864a2e2c
commit
15e09eb6ec
@ -1104,6 +1104,10 @@ EX void compute_fsize() {
|
||||
|
||||
EX bool graphics_on;
|
||||
|
||||
EX bool request_resolution_change;
|
||||
|
||||
EX void do_request_resolution_change() { request_resolution_change = true; }
|
||||
|
||||
EX bool want_vsync() {
|
||||
if(vrhr::active())
|
||||
return false;
|
||||
@ -1117,7 +1121,7 @@ EX bool need_to_reopen_window() {
|
||||
return true;
|
||||
if(want_vsync() != vid.current_vsync)
|
||||
return true;
|
||||
if(vid.usingGL && make_pair(vid.xres, vid.yres) != get_requested_resolution())
|
||||
if(request_resolution_change)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
12
config.cpp
12
config.cpp
@ -759,27 +759,27 @@ EX void initConfig() {
|
||||
|
||||
param_i(vid.fullscreen_x, "fullscreen_x", 1280)
|
||||
-> editable(640, 3840, 640, "fullscreen resolution to use (X)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(640); });
|
||||
-> set_sets([] { dialog::bound_low(640); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_i(vid.fullscreen_y, "fullscreen_y", 1024)
|
||||
-> editable(480, 2160, 480, "fullscreen resolution to use (Y)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(480); });
|
||||
-> set_sets([] { dialog::bound_low(480); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_i(vid.window_x, "window_x", 1280)
|
||||
-> editable(160, 3840, 160, "window resolution to use (X)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(160); });
|
||||
-> set_sets([] { dialog::bound_low(160); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_i(vid.window_y, "window_y", 1024)
|
||||
-> editable(120, 2160, 120, "window resolution to use (Y)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(120); });
|
||||
-> set_sets([] { dialog::bound_low(120); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_f(vid.window_rel_x, "window_rel_x", .9)
|
||||
-> editable(.1, 1, .1, "screen size percentage to use (X)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(.1); });
|
||||
-> set_sets([] { dialog::bound_low(.1); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_f(vid.window_rel_y, "window_rel_y", .9)
|
||||
-> editable(.1, 1, .1, "screen size percentage to use (Y)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(.1); });
|
||||
-> set_sets([] { dialog::bound_low(.1); dialog::reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_b(vid.darkhepta, "mark heptagons", false);
|
||||
|
||||
|
@ -686,6 +686,7 @@ EX namespace netgen {
|
||||
dynamicval<bool> dfs(vid.change_fullscr, true);
|
||||
dynamicval<bool> dcf(vid.want_fullscreen, false);
|
||||
dynamicval<eModel> m(pmodel, mdPixel);
|
||||
request_resolution_change = true;
|
||||
|
||||
apply_screen_settings();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user