--- a/src/video/win32_v.cpp Mon Dec 03 23:39:38 2007 +0000
+++ b/src/video/win32_v.cpp Tue Jan 22 21:00:30 2008 +0000
@@ -2,14 +2,12 @@
#include "../stdafx.h"
#include "../openttd.h"
-#include "../functions.h"
-#include "../gfx.h"
-#include "../macros.h"
-#include "../network/network.h"
+#include "../gfx_func.h"
#include "../variables.h"
#include "../win32.h"
-#include "../window.h"
#include "../blitter/factory.hpp"
+#include "../network/network.h"
+#include "../core/math_func.hpp"
#include "win32_v.h"
#include <windows.h>
#include <tchar.h>
@@ -213,7 +211,7 @@
}
}
-static void MakeWindow(bool full_screen)
+static bool MakeWindow(bool full_screen)
{
_fullscreen = full_screen;
@@ -245,8 +243,8 @@
settings.dmDisplayFrequency = _display_hz;
if (ChangeDisplaySettings(&settings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) {
- MakeWindow(false);
- return;
+ MakeWindow(false); // don't care about the result
+ return false; // the request failed
}
} else if (_wnd.fullscreen) {
// restore display?
@@ -294,6 +292,7 @@
}
}
GameSizeChanged(); // invalidate all windows, force redraw
+ return true; // the request succedded
}
static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -898,12 +897,10 @@
_wnd.width = _wnd.width_org = w;
_wnd.height = _wnd.height_org = h;
- MakeWindow(_fullscreen); // _wnd.fullscreen screws up ingame resolution switching
-
- return true;
+ return MakeWindow(_fullscreen); // _wnd.fullscreen screws up ingame resolution switching
}
-void VideoDriver_Win32::ToggleFullscreen(bool full_screen)
+bool VideoDriver_Win32::ToggleFullscreen(bool full_screen)
{
- MakeWindow(full_screen);
+ return MakeWindow(full_screen);
}