From f4d5c1b01bc0ddb3995db912a16ebaeb0069c9f9 Mon Sep 17 00:00:00 2001 From: celestar Date: Wed, 22 Mar 2006 11:24:27 +0000 Subject: [PATCH] (svn r4017) -Backport from trunk (3999): Change the order of DestroyWindow and ChangeDisplay. On some machines a sizechange messagequeue is handled before sending WM_DISPLAYCHANGE resulting in an improper resolution written to the configuration file when exiting from fullscreen. (Frostregen) --- video/win32_v.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/video/win32_v.c b/video/win32_v.c index 87533a551e..bbbb3d700f 100644 --- a/video/win32_v.c +++ b/video/win32_v.c @@ -651,6 +651,10 @@ static const char *Win32GdiStart(const char * const *parm) static void Win32GdiStop(void) { + DeleteObject(_wnd.gdi_palette); + DeleteObject(_wnd.dib_sect); + DestroyWindow(_wnd.main_wnd); + if (_wnd.fullscreen) ChangeDisplaySettings(NULL, 0); if (_double_size) { _cur_resolution[0] *= 2; @@ -658,9 +662,6 @@ static void Win32GdiStop(void) } MyShowCursor(true); - DeleteObject(_wnd.gdi_palette); - DeleteObject(_wnd.dib_sect); - DestroyWindow(_wnd.main_wnd); } // simple upscaler by 2