2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Fixes for MinGW's flawed _WIN32_WINNT stuff.

This commit is contained in:
Darryl Pogue
2012-02-04 19:15:35 -08:00
parent b27fc17b00
commit 8416c8ed42
2 changed files with 16 additions and 3 deletions

View File

@ -58,6 +58,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# pragma warning( disable : 4305 4503 4018 4786 4284 4800) # pragma warning( disable : 4305 4503 4018 4786 4284 4800)
# endif // _MSC_VER # endif // _MSC_VER
// Terrible hacks for MinGW because they don't have a reasonable
// default for the Windows version. We cheat and say it's XP.
# ifdef __MINGW32__
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x501
# undef _WIN32_IE
# define _WIN32_IE 0x400
# endif
// Windows.h includes winsock.h (winsocks 1), so we need to manually include winsock2 // Windows.h includes winsock.h (winsocks 1), so we need to manually include winsock2
// and tell Windows.h to only bring in modern headers // and tell Windows.h to only bring in modern headers
# ifndef MAXPLUGINCODE # ifndef MAXPLUGINCODE
@ -65,7 +74,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# include <ws2tcpip.h> # include <ws2tcpip.h>
# endif // MAXPLUGINCODE # endif // MAXPLUGINCODE
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# define NOMINMAX // Needed to prevent NxMath conflicts # ifndef NOMINMAX
# define NOMINMAX // Needed to prevent NxMath conflicts
# endif
# include <Windows.h> # include <Windows.h>
typedef HWND hsWindowHndl; typedef HWND hsWindowHndl;

View File

@ -57,9 +57,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <ddraw.h> #include <ddraw.h>
#include <d3dx9mesh.h> #include <d3dx9mesh.h>
#ifdef DX_OLD_SDK #if defined(DX_OLD_SDK) || defined(__MINGW32__)
#include <dxerr9.h> #include <dxerr9.h>
#define DXGetErrorString9 DXGetErrorString #ifndef DXGetErrorString9
#define DXGetErrorString9 DXGetErrorString
#endif
#else #else
#include <dxerr.h> #include <dxerr.h>
#endif #endif