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:
zicodxx 2011-01-16 02:09:45 +01:00
parent a8f3f4764f
commit ee3a1b6189
2 changed files with 10 additions and 1 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
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; Little fix for ogl_get_verinfo which was taken out for ordinary OGL code but should for OGLES
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
--------

View file

@ -998,8 +998,16 @@ void change_res()
newmenu_free_background();
set_screen_mode(SCREEN_MENU);
if (new_mode != Game_screen_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);
}
}