When changing resolutions and Game_wind is present, send EVENT_WINDOW_ACTIVATE shortly so it's canvase will align to the new resolution seamlessly
This commit is contained in:
parent
025a6c3951
commit
e5fc130b82
|
@ -3,6 +3,7 @@ D2X-Rebirth Changelog
|
||||||
20110116
|
20110116
|
||||||
--------
|
--------
|
||||||
2d/bitblt.c, arch/ogl/gr.c, arch/ogl/ogl.c, include/ogl_init.h, main/menu.c: Added feature to enable Anisotropic filtering is supported by hardware or driver; Reworked way of handling texture filtering information so ingame switching is possible again
|
2d/bitblt.c, arch/ogl/gr.c, arch/ogl/ogl.c, include/ogl_init.h, main/menu.c: Added feature to enable Anisotropic filtering is supported by hardware or driver; Reworked way of handling texture filtering information so ingame switching is possible again
|
||||||
|
main/menu.c: When changing resolutions and Game_wind is present, send EVENT_WINDOW_ACTIVATE shortly so it's canvase will align to the new resolution seamlessly
|
||||||
|
|
||||||
20110115
|
20110115
|
||||||
--------
|
--------
|
||||||
|
|
10
main/menu.c
10
main/menu.c
|
@ -1039,8 +1039,16 @@ void change_res()
|
||||||
newmenu_free_background();
|
newmenu_free_background();
|
||||||
set_screen_mode(SCREEN_MENU);
|
set_screen_mode(SCREEN_MENU);
|
||||||
if (new_mode != Game_screen_mode)
|
if (new_mode != Game_screen_mode)
|
||||||
|
{
|
||||||
gr_set_mode(new_mode);
|
gr_set_mode(new_mode);
|
||||||
Game_screen_mode = new_mode;
|
Game_screen_mode = new_mode;
|
||||||
|
if (Game_wind) // shortly activate Game_wind so it's canvas will align to new resolution. really minor glitch but whatever
|
||||||
|
{
|
||||||
|
d_event event;
|
||||||
|
WINDOW_SEND_EVENT(Game_wind, EVENT_WINDOW_ACTIVATED);
|
||||||
|
WINDOW_SEND_EVENT(Game_wind, EVENT_WINDOW_DEACTIVATED);
|
||||||
|
}
|
||||||
|
}
|
||||||
game_init_render_buffers(SM_W(Game_screen_mode), SM_H(Game_screen_mode), VR_NONE);
|
game_init_render_buffers(SM_W(Game_screen_mode), SM_H(Game_screen_mode), VR_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue