summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-21 21:55:49 +0000
committerDarkvater <darkvater@openttd.org>2006-03-21 21:55:49 +0000
commitcbab3eded2e8a21d58ef474a22ebefd12d4360e7 (patch)
tree7795e4171492cd9ee935d5faf27e65966bc2b67b
parent6d327f9dafb2b9ade2b79e7eef9cf9d83b1fc579 (diff)
downloadopenttd-cbab3eded2e8a21d58ef474a22ebefd12d4360e7.tar.xz
(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)
-rw-r--r--video/win32_v.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/win32_v.c b/video/win32_v.c
index 01e3c0cd8..3ecda2528 100644
--- a/video/win32_v.c
+++ b/video/win32_v.c
@@ -656,6 +656,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;
@@ -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