# HG changeset patch # User Darkvater # Date 2006-03-21 21:55:49 # Node ID ce6a32e7915b3e514864ac6816b77d1d0c83e9a9 # Parent d4747e3ae95e31ce612e2b3832404870a746b311 (svn r3999) - Fix: [win32] 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 --git a/video/win32_v.c b/video/win32_v.c --- a/video/win32_v.c +++ b/video/win32_v.c @@ -656,6 +656,10 @@ static const char *Win32GdiStart(const c 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; @@ -663,9 +667,6 @@ static void Win32GdiStop(void) } MyShowCursor(true); - DeleteObject(_wnd.gdi_palette); - DeleteObject(_wnd.dib_sect); - DestroyWindow(_wnd.main_wnd); } // simple upscaler by 2