mirror of https://github.com/OpenTTD/OpenTTD
(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)
parent
6d327f9daf
commit
cbab3eded2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue