Fix build on Windows

When rearranging the code some features of Windows.h start to interfere
with other code. For example this happens when adding more precompiled
headers.
precompile_headers
elsid 2 years ago
parent d991b63861
commit 5ad2ae04ce
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -346,7 +346,12 @@ if (WIN32)
add_definitions(-DSDL_MAIN_HANDLED)
# Get rid of useless crud from windows.h
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
add_definitions(
-DNOMINMAX # name conflict with std::min, std::max
-DWIN32_LEAN_AND_MEAN
-DNOMB # name conflict with MWGui::MessageBox
-DNOGDI # name conflict with osgAnimation::MorphGeometry::RELATIVE
)
endif()
if(OPENMW_USE_SYSTEM_BULLET)

@ -13,8 +13,6 @@
#include "../mwbase/inputmanager.hpp"
#include "../mwbase/windowmanager.hpp"
#undef MessageBox
namespace MWGui
{

@ -3,8 +3,6 @@
#include "windowbase.hpp"
#undef MessageBox
namespace MyGUI
{
class Widget;

@ -4,10 +4,16 @@
#include <cstring>
#define FAR
#define NEAR
#include <shlobj.h>
#include <shlwapi.h>
#include <winreg.h>
#undef NEAR
#undef FAR
#include <boost/locale.hpp>
namespace bconv = boost::locale::conv;

Loading…
Cancel
Save