Browse Source

Fixes for MinGW's flawed _WIN32_WINNT stuff.

Darryl Pogue 13 years ago
parent
commit
8416c8ed42
  1. 11
      Sources/Plasma/CoreLib/hsWindows.h
  2. 4
      Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

11
Sources/Plasma/CoreLib/hsWindows.h

@ -58,6 +58,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# pragma warning( disable : 4305 4503 4018 4786 4284 4800)
# 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
// and tell Windows.h to only bring in modern headers
# ifndef MAXPLUGINCODE
@ -65,7 +74,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# include <ws2tcpip.h>
# endif // MAXPLUGINCODE
# define WIN32_LEAN_AND_MEAN
# ifndef NOMINMAX
# define NOMINMAX // Needed to prevent NxMath conflicts
# endif
# include <Windows.h>
typedef HWND hsWindowHndl;

4
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

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

Loading…
Cancel
Save