From 51bd9fe40ef79bc8017b68325ef9129147fbcd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Mon, 10 Aug 2015 04:48:57 -0400 Subject: [PATCH] Fix compilation errors of the old plugins. - zerospu2: include stdint.h in Windows. (VC2012+) - CDVDolio: Remove hash_map (not used, VC2015+) - zerogs: Fix extern and link to utilities. (VC2012+) - zzogl: Port windows part to wx30. (VC2012+) --- common/include/Pcsx2Types.h | 3 ++- plugins/CDVDolio/stdafx.h | 2 -- plugins/zerogs/dx/GS.h | 2 +- plugins/zerogs/dx/Windows/zerogs.vcxproj | 4 ++++ plugins/zzogl-pg/opengl/Win32/Conf.cpp | 27 ++++++++++++++++-------- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/common/include/Pcsx2Types.h b/common/include/Pcsx2Types.h index 4371f1f9cf..111768ff77 100644 --- a/common/include/Pcsx2Types.h +++ b/common/include/Pcsx2Types.h @@ -34,6 +34,8 @@ // Basic Atomic Types // -------------------------------------------------------------------------------------- +#include "stdint.h" + #if defined(_MSC_VER) // In doubt, we keep this define for VS2010 @@ -50,7 +52,6 @@ typedef unsigned __int64 u64; #else // _MSC_VER*/ -#include "stdint.h" // Note: char does not have a default sign, unlike other types. As we actually want // char and not signed char in pcsx2, we define s8 to char diff --git a/plugins/CDVDolio/stdafx.h b/plugins/CDVDolio/stdafx.h index 09b72ee6b9..78ffa3fcc8 100644 --- a/plugins/CDVDolio/stdafx.h +++ b/plugins/CDVDolio/stdafx.h @@ -52,10 +52,8 @@ #include #include #include -#include using namespace std; -using namespace stdext; extern string format(const char* fmt, ...); diff --git a/plugins/zerogs/dx/GS.h b/plugins/zerogs/dx/GS.h index 09220c5ae3..f25b41d397 100644 --- a/plugins/zerogs/dx/GS.h +++ b/plugins/zerogs/dx/GS.h @@ -647,7 +647,7 @@ char *SysLibError(); // Gets previous error loading sysbols void SysCloseLibrary(void *lib); // Closes Library void SysMessage(char *fmt, ...); -extern "C" u8 memcmp_mmx(const void *dest, const void *src, int n); +extern u8 memcmp_mmx(const void *dest, const void *src, int n); template class CInterfacePtr diff --git a/plugins/zerogs/dx/Windows/zerogs.vcxproj b/plugins/zerogs/dx/Windows/zerogs.vcxproj index a3569d3d76..60be17914e 100644 --- a/plugins/zerogs/dx/Windows/zerogs.vcxproj +++ b/plugins/zerogs/dx/Windows/zerogs.vcxproj @@ -200,6 +200,10 @@ true false + + {4639972e-424e-4e13-8b07-ca403c481346} + false + diff --git a/plugins/zzogl-pg/opengl/Win32/Conf.cpp b/plugins/zzogl-pg/opengl/Win32/Conf.cpp index 3a7f5449d4..b18ce98d70 100644 --- a/plugins/zzogl-pg/opengl/Win32/Conf.cpp +++ b/plugins/zzogl-pg/opengl/Win32/Conf.cpp @@ -37,7 +37,7 @@ void SaveConfig() WritePrivateProfileString(L"Settings", L"Antialiasing", szValue, iniFile); wxSprintf(szValue, L"%u", conf.bilinear); WritePrivateProfileString(L"Settings", L"Bilinear", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.zz_options); + wxSprintf(szValue, L"%u", conf.zz_options._u32); WritePrivateProfileString(L"Settings", L"ZZOptions", szValue, iniFile); wxSprintf(szValue, L"%u", conf.hacks._u32); WritePrivateProfileString(L"Settings", L"AdvancedOptions", szValue, iniFile); @@ -52,6 +52,7 @@ void SaveConfig() void LoadConfig() { wxChar szValue[256]; + unsigned long val; const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg.ini")); memset(&conf, 0, sizeof(conf)); @@ -78,21 +79,29 @@ void LoadConfig() fclose(fp); GetPrivateProfileString(L"Settings", L"Interlace", NULL, szValue, 20, iniFile); - conf.interlace = (u8)wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.interlace = (u8)val; GetPrivateProfileString(L"Settings", L"Antialiasing", NULL, szValue, 20, iniFile); - conf.aa = (u8)wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.aa = (u8)val; GetPrivateProfileString(L"Settings", L"ZZOptions", NULL, szValue, 20, iniFile); - conf.zz_options._u32 = wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.zz_options._u32 = val; GetPrivateProfileString(L"Settings", L"AdvancedOptions", NULL, szValue, 20, iniFile); - conf.hacks._u32 = wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.hacks._u32 = val; GetPrivateProfileString(L"Settings", L"Bilinear", NULL, szValue, 20, iniFile); - conf.bilinear = (u8)wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.bilinear = (u8)val; GetPrivateProfileString(L"Settings", L"Width", NULL, szValue, 20, iniFile); - conf.width = wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.width = val; GetPrivateProfileString(L"Settings", L"Height", NULL, szValue, 20, iniFile); - conf.height = wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.height = val; GetPrivateProfileString(L"Settings", L"SkipDraw", NULL, szValue, 20, iniFile); - conf.SkipDraw = wxStrtoul(szValue, NULL, 10); + wxString(szValue).ToULong(&val); + conf.SkipDraw = val; if (conf.aa < 0 || conf.aa > 4) conf.aa = 0;