mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-18 23:41:38 +00:00
Work around the missing _controlfp prototypes in MinGW
This commit is contained in:
parent
58c3b22c8a
commit
28be8cda8e
3 changed files with 14 additions and 7 deletions
6
TODO
6
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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue