summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-09 05:34:56 +0000
committerrubidium <rubidium@openttd.org>2007-08-09 05:34:56 +0000
commit5399a272e61ed2cf8689fe8499e5d36c270ee2d9 (patch)
tree65e6262fba1ee8de21cc8c3088d2753265220ee5 /src/video
parent2bff32afb078791d8d4cf238ccd2c1136fae84bb (diff)
downloadopenttd-5399a272e61ed2cf8689fe8499e5d36c270ee2d9.tar.xz
(svn r10834) -Revert (part of r10833): something too much was committed :(
Diffstat (limited to 'src/video')
-rw-r--r--src/video/win32_v.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 65937fa9e..02ad4a2d4 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -219,9 +219,8 @@ static void MakeWindow(bool full_screen)
// recreate window?
if ((full_screen || _wnd.fullscreen) && _wnd.main_wnd) {
- HWND wnd = _wnd.main_wnd;
+ DestroyWindow(_wnd.main_wnd);
_wnd.main_wnd = 0;
- DestroyWindow(wnd);
}
#if defined(WINCE)
@@ -520,9 +519,6 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
break;
case WM_SIZE:
- /* Resizing a destroy window is NOT good */
- if (_wnd.main_wnd == 0) return;
-
if (wParam != SIZE_MINIMIZED) {
/* Set maximized flag when we maximize (obviously), but also when we
* switched to fullscreen from a maximized state */
@@ -796,9 +792,7 @@ void VideoDriver_Win32::Stop()
{
DeleteObject(_wnd.gdi_palette);
DeleteObject(_wnd.dib_sect);
- HWND wnd = _wnd.main_wnd;
- _wnd.main_wnd = 0;
- DestroyWindow(wnd);
+ DestroyWindow(_wnd.main_wnd);
#if !defined(WINCE)
if (_wnd.fullscreen) ChangeDisplaySettings(NULL, 0);