(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)
This commit is contained in:
truelight
2007-08-04 12:53:41 +00:00
parent cb9d0c69d1
commit 424757c078
6 changed files with 61 additions and 9 deletions

View File

@@ -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();

View File

@@ -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];