From 2e096a9b36871d1411e398ee93e3dcee8bc6b231 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 19 Jun 2014 01:17:35 +0200 Subject: [PATCH] Fix Ryzom client compile under MinGW --- code/ryzom/client/src/commands.cpp | 4 ++-- code/ryzom/client/src/init.cpp | 4 ++-- code/ryzom/client/src/stdpch.h | 8 +++++--- code/ryzom/common/src/game_share/stdpch.h | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 3805122f2..ad8a328ba 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -3921,11 +3921,11 @@ NLMISC_COMMAND (url, "launch a browser to the specified url", "") return false; HINSTANCE result = ShellExecute(NULL, "open", args[0].c_str(), NULL,NULL, SW_SHOW); - if ((sint32)result > 32) + if ((intptr_t)result > 32) return true; else { - log.displayNL ("ShellExecute failed %d", (uint32)result); + log.displayNL ("ShellExecute failed %d", (uint32)(intptr_t)result); return false; } } diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index aa18cee6a..809232983 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -882,9 +882,9 @@ void prelogInit() UDriver::TDriver driver = UDriver::OpenGl; #ifdef NL_OS_WINDOWS - uint icon = (uint)LoadIcon(HInstance, MAKEINTRESOURCE(IDI_MAIN_ICON)); + uintptr_t icon = (uintptr_t)LoadIcon(HInstance, MAKEINTRESOURCE(IDI_MAIN_ICON)); #else - uint icon = 0; + uintptr_t icon = 0; #endif // NL_OS_WINDOWS switch(ClientCfg.Driver3D) diff --git a/code/ryzom/client/src/stdpch.h b/code/ryzom/client/src/stdpch.h index 48451ceea..5f046fcfe 100644 --- a/code/ryzom/client/src/stdpch.h +++ b/code/ryzom/client/src/stdpch.h @@ -120,7 +120,9 @@ // Foutez pas d'include du client ici svp ! Grrr ! Hulud #ifdef NL_OS_WINDOWS -#define NOMINMAX -#include -#include +# ifndef NL_COMP_MINGW +# define NOMINMAX +# endif +# include +# include #endif // NL_OS_WINDOWS diff --git a/code/ryzom/common/src/game_share/stdpch.h b/code/ryzom/common/src/game_share/stdpch.h index e658fff41..320e8c523 100644 --- a/code/ryzom/common/src/game_share/stdpch.h +++ b/code/ryzom/common/src/game_share/stdpch.h @@ -67,7 +67,9 @@ #include #ifdef NL_OS_WINDOWS -# define NOMINMAX +# ifndef NL_COMP_MINGW +# define NOMINMAX +# endif # include # include #endif