From 7f51cd60030792db3adf1feb3987cc29b2b9d26a Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 15 Feb 2015 23:14:54 +0100 Subject: [PATCH] Cleaner fix for compilation problem in SFMT.h, though had to patch it. --- Core/Core.vcxproj | 9 ++------- Core/HLE/sceSfmt19937.cpp | 5 ++++- ext/sfmt19937/SFMT.h | 4 +++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index c51f7d698f..a0720a7c62 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -264,12 +264,7 @@ - - _XKEYCHECK_H;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - _XKEYCHECK_H;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_M_IX86=1;_LIB;NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions) - _XKEYCHECK_H;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - _XKEYCHECK_H;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_M_X64=1;_LIB;NDEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions) - + @@ -632,4 +627,4 @@ - \ No newline at end of file + diff --git a/Core/HLE/sceSfmt19937.cpp b/Core/HLE/sceSfmt19937.cpp index aedb2ed093..08afe564e6 100644 --- a/Core/HLE/sceSfmt19937.cpp +++ b/Core/HLE/sceSfmt19937.cpp @@ -15,12 +15,15 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +// Mersenne Twister random number generator module. + #include "ext/sfmt19937/SFMT.h" -#include "sceSfmt19937.h" #include "Common/Log.h" #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" +#include "Core/HLE/sceSfmt19937.h" + static int sceSfmt19937InitGenRand(u32 sfmt, u32 seed) { if (!Memory::IsValidAddress(sfmt)) { diff --git a/ext/sfmt19937/SFMT.h b/ext/sfmt19937/SFMT.h index dca308a003..5449ef646f 100644 --- a/ext/sfmt19937/SFMT.h +++ b/ext/sfmt19937/SFMT.h @@ -46,7 +46,9 @@ extern "C" { #elif defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned int uint32_t; typedef unsigned __int64 uint64_t; - #define inline __inline +#if !defined(__cplusplus) + #define inline __inline +#endif #else #include #if defined(__GNUC__)