(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)
authorDarkvater
Tue, 21 Mar 2006 21:55:49 +0000
changeset 3285 c162cb0b57c1
parent 3284 fafe2ef7b809
child 3286 3250f1488eb2
(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)
video/win32_v.c
--- a/video/win32_v.c	Tue Mar 21 21:11:41 2006 +0000
+++ b/video/win32_v.c	Tue Mar 21 21:55:49 2006 +0000
@@ -656,6 +656,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;
@@ -663,9 +667,6 @@
 	}
 
 	MyShowCursor(true);
-	DeleteObject(_wnd.gdi_palette);
-	DeleteObject(_wnd.dib_sect);
-	DestroyWindow(_wnd.main_wnd);
 }
 
 // simple upscaler by 2