diff options
author | truelight <truelight@openttd.org> | 2007-08-04 12:53:41 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-08-04 12:53:41 +0000 |
commit | 424757c078410041cce35a8678b59b7a56c47ccb (patch) | |
tree | 95e47824c2caa1c36c3ad2d37010fe7f16650f26 /src/video | |
parent | cb9d0c69d1fac53c479b678741f82df084b1b5ba (diff) | |
download | openttd-424757c078410041cce35a8678b59b7a56c47ccb.tar.xz |
(svn r10781) -Fix: ported more pieces to WinCE, so it compiles a bit more
-Fix: WinCE doesn't support console
-Fix: Set debug lvl4 when running a debug WinCE build (as you can't give parameters any easy way)
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/dedicated_v.cpp | 21 | ||||
-rw-r--r-- | src/video/win32_v.cpp | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index d4bfa7cbc..3d9490c59 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -66,11 +66,13 @@ static void DedicatedSignalHandler(int sig) } #endif -#ifdef WIN32 -#include <windows.h> /* GetTickCount */ -#include <conio.h> -#include <time.h> -#include <tchar.h> +#if defined(WIN32) +# include <windows.h> /* GetTickCount */ +# if !defined(WINCE) +# include <conio.h> +# endif +# include <time.h> +# include <tchar.h> static HANDLE _hInputReady, _hWaitForInputHandling; static HANDLE _hThread; // Thread to close static char _win_console_thread_buffer[200]; @@ -78,6 +80,10 @@ static char _win_console_thread_buffer[200]; /* Windows Console thread. Just loop and signal when input has been received */ static void WINAPI CheckForConsoleInput() { +#if defined(WINCE) + /* WinCE doesn't support console stuff */ + return; +#else DWORD nb; HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); while (true) { @@ -87,6 +93,7 @@ static void WINAPI CheckForConsoleInput() SetEvent(_hInputReady); WaitForSingleObject(_hWaitForInputHandling, INFINITE); } +#endif } static void CreateWindowsConsoleThread() @@ -133,7 +140,9 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm) SetDebugString("net=6"); -#ifdef WIN32 +#if defined(WINCE) + /* WinCE doesn't support console stuff */ +#elif defined(WIN32) // For win32 we need to allocate a console (debug mode does the same) CreateConsole(); CreateWindowsConsoleThread(); diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 46c6cc851..a963575c5 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -775,6 +775,8 @@ const char *VideoDriver_Win32::Start(const char * const *parm) FindResolutions(); + DEBUG(driver, 2, "Resolution for display: %dx%d", _cur_resolution[0], _cur_resolution[1]); + // fullscreen uses those _wnd.width_org = _cur_resolution[0]; _wnd.height_org = _cur_resolution[1]; |