diff --git a/TODO b/TODO index da8602c6..1e978d27 100644 --- a/TODO +++ b/TODO @@ -2,12 +2,6 @@ Windows Port TODO ----------------- - Check WITH_SYSTEMWIDE -- Check if we really need all the stuff in winquake.h -- Due to a bug in MinGW the _controlfp() option defines _PC_24 - and _MCW_PC are not available. While Quake II may work without - them, we should try to find a workaround. See: - http://mingw-users.1079350.n2.nabble.com/MinGW-missing- - controlfp-and-related-defines-Looks-like-not-td7278570.html - Currently the Makefiles needs a special "mkdir.exe" which supports the -p option. We need a better aproach so that the Windows buildin "mkdir" can be used. diff --git a/src/windows/header/winquake.h b/src/windows/header/winquake.h index 531beab3..9bcb3250 100644 --- a/src/windows/header/winquake.h +++ b/src/windows/header/winquake.h @@ -28,6 +28,19 @@ #define WINDOW_STYLE (WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE) +#ifndef _PC_24 + #define _PC_24 0x00020000 +#endif + +#ifndef _MCW_PC + #define _MCW_PC 0x00030000 +#endif + +/* This is a hack to work around a missing MinGW prototype */ +#ifndef _controlfp +unsigned int _controlfp(unsigned int new, unsigned int mask); +#endif + extern HINSTANCE global_hInstance; extern HWND cl_hwnd; diff --git a/src/windows/system.c b/src/windows/system.c index e5963b88..455aa616 100644 --- a/src/windows/system.c +++ b/src/windows/system.c @@ -693,7 +693,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, } while (time < 1); - /*_controlfp(_PC_24, _MCW_PC); */ + _controlfp(_PC_24, _MCW_PC); Qcommon_Frame(time); oldtime = newtime;