# HG changeset patch # User celestar # Date 1143026667 0 # Node ID 6755bbbe240854fb50775270ac89582e4fa4fc6c # Parent d3cb7e05c5a6a8d5a4691d4a0908c8543c7c3681 (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) diff -r d3cb7e05c5a6 -r 6755bbbe2408 video/win32_v.c --- a/video/win32_v.c Wed Mar 22 11:23:22 2006 +0000 +++ b/video/win32_v.c Wed Mar 22 11:24:27 2006 +0000 @@ -651,6 +651,10 @@ 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 @@ } MyShowCursor(true); - DeleteObject(_wnd.gdi_palette); - DeleteObject(_wnd.dib_sect); - DestroyWindow(_wnd.main_wnd); } // simple upscaler by 2