diff --git a/Project64.sln b/Project64.sln index 001b80d88..d7a1d2956 100644 --- a/Project64.sln +++ b/Project64.sln @@ -1,6 +1,7 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 or later +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{AA8F7F8E-5377-4911-859D-8A8817B0DB26}" EndProject @@ -63,6 +64,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "Source\3rdParty\sdl EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64-core", "Source\Project64-core\Project64-core.vcxproj", "{00C7B43A-DED7-4DF0-B072-9A5783EF866D}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSP-hle", "Source\RSP-hle\RSP-hle.vcxproj", "{B6D45C01-0067-48E6-9FC3-29329D6A5ACA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -220,6 +223,12 @@ Global {00C7B43A-DED7-4DF0-B072-9A5783EF866D}.Release|Win32.Build.0 = Release|Win32 {00C7B43A-DED7-4DF0-B072-9A5783EF866D}.Release|x64.ActiveCfg = Release|x64 {00C7B43A-DED7-4DF0-B072-9A5783EF866D}.Release|x64.Build.0 = Release|x64 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Debug|Win32.Build.0 = Debug|Win32 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Debug|x64.ActiveCfg = Debug|Win32 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Release|Win32.ActiveCfg = Release|Win32 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Release|Win32.Build.0 = Release|Win32 + {B6D45C01-0067-48E6-9FC3-29329D6A5ACA}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Source/Common/CriticalSection.cpp b/Source/Common/CriticalSection.cpp index 05c151cad..396764f2f 100644 --- a/Source/Common/CriticalSection.cpp +++ b/Source/Common/CriticalSection.cpp @@ -1,4 +1,5 @@ #include "stdafx.h" +#include CriticalSection::CriticalSection() { diff --git a/Source/Common/FileClass.cpp b/Source/Common/FileClass.cpp index 2dc7a73b3..2e2226567 100644 --- a/Source/Common/FileClass.cpp +++ b/Source/Common/FileClass.cpp @@ -1,4 +1,5 @@ #include "stdafx.h" +#include #include diff --git a/Source/Common/IniFileClass.cpp b/Source/Common/IniFileClass.cpp index 217de27a1..2f4cd0a73 100644 --- a/Source/Common/IniFileClass.cpp +++ b/Source/Common/IniFileClass.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" - +#include #include CIniFileBase::CIniFileBase(CFileBase & FileObject, LPCTSTR FileName) : diff --git a/Source/Common/StdString.cpp b/Source/Common/StdString.cpp index a868d2ada..98e41c12d 100644 --- a/Source/Common/StdString.cpp +++ b/Source/Common/StdString.cpp @@ -1,6 +1,8 @@ #include "stdafx.h" #include #include +#include "StdString.h" +#include stdstr::stdstr() { @@ -131,7 +133,8 @@ stdstr & stdstr::TrimLeft(const char * chars2remove) { erase(0, pos); } - else { + else + { erase(begin(), end()); // make empty } } @@ -147,7 +150,8 @@ stdstr & stdstr::TrimRight(const char * chars2remove) { erase(pos + 1); } - else { + else + { erase(begin(), end()); // make empty } } @@ -181,6 +185,7 @@ stdstr & stdstr::Trim(const char * chars2remove) return *this; } +#ifdef _WIN32 stdstr & stdstr::FromUTF16(const wchar_t * UTF16Source, bool * bSuccess) { bool bConverted = false; @@ -192,7 +197,7 @@ stdstr & stdstr::FromUTF16(const wchar_t * UTF16Source, bool * bSuccess) } else if (wcslen(UTF16Source) > 0) { - DWORD nNeeded = WideCharToMultiByte(CP_UTF8, 0, UTF16Source, -1, NULL, 0, NULL, NULL); + uint32_t nNeeded = WideCharToMultiByte(CODEPAGE_UTF8, 0, UTF16Source, -1, NULL, 0, NULL, NULL); if (nNeeded > 0) { char * buf = (char *)alloca(nNeeded + 1); @@ -200,7 +205,7 @@ stdstr & stdstr::FromUTF16(const wchar_t * UTF16Source, bool * bSuccess) { memset(buf, 0, nNeeded + 1); - nNeeded = WideCharToMultiByte(CP_UTF8, 0, UTF16Source, -1, buf, nNeeded, NULL, NULL); + nNeeded = WideCharToMultiByte(CODEPAGE_UTF8, 0, UTF16Source, -1, buf, nNeeded, NULL, NULL); if (nNeeded) { *this = buf; @@ -216,7 +221,7 @@ stdstr & stdstr::FromUTF16(const wchar_t * UTF16Source, bool * bSuccess) return *this; } -std::wstring stdstr::ToUTF16(UINT CodePage, bool * bSuccess) +std::wstring stdstr::ToUTF16(unsigned int CodePage, bool * bSuccess) { bool bConverted = false; std::wstring res; @@ -242,4 +247,13 @@ std::wstring stdstr::ToUTF16(UINT CodePage, bool * bSuccess) *bSuccess = bConverted; } return res; -} \ No newline at end of file +} +#endif + +stdstr_f::stdstr_f(const char * strFormat, ...) +{ + va_list args; + va_start(args, strFormat); + ArgFormat(strFormat,args); + va_end(args); +} diff --git a/Source/Common/StdString.h b/Source/Common/StdString.h index 9fd743068..9f1342e1f 100644 --- a/Source/Common/StdString.h +++ b/Source/Common/StdString.h @@ -38,8 +38,10 @@ public: stdstr & TrimLeft(const char * chars2remove = "\t "); stdstr & TrimRight(const char * chars2remove = "\t "); - stdstr & FromUTF16(const wchar_t * UTF16Source, bool * bSuccess = NULL); +#ifdef _WIN32 + stdstr & FromUTF16(const wchar_t * UTF16Source, bool * bSuccess = NULL); std::wstring ToUTF16(unsigned int CodePage = CODEPAGE_UTF8, bool * bSuccess = NULL); +#endif void ArgFormat(const char * strFormat, va_list & args); }; @@ -47,13 +49,7 @@ public: class stdstr_f : public stdstr { public: - stdstr_f(const char * strFormat, ...) - { - va_list args; - va_start(args, strFormat); - ArgFormat(strFormat, args); - va_end(args); - } + stdstr_f(const char * strFormat, ...); }; class stdwstr_f : public std::wstring diff --git a/Source/Common/SyncEvent.cpp b/Source/Common/SyncEvent.cpp index cdf4b4735..34266a5a4 100644 --- a/Source/Common/SyncEvent.cpp +++ b/Source/Common/SyncEvent.cpp @@ -1,8 +1,9 @@ #include "stdafx.h" +#include SyncEvent::SyncEvent(bool bManualReset) { - m_Event = CreateEvent(NULL, bManualReset, FALSE, NULL); + m_Event = CreateEvent(NULL, bManualReset, false, NULL); } SyncEvent::~SyncEvent() diff --git a/Source/Common/Trace.cpp b/Source/Common/Trace.cpp index cbc31e39b..a57c08af5 100644 --- a/Source/Common/Trace.cpp +++ b/Source/Common/Trace.cpp @@ -1,4 +1,5 @@ #include "stdafx.h" +#include typedef std::map ModuleNameMap; diff --git a/Source/Common/Util.cpp b/Source/Common/Util.cpp index ab32891a2..b79ca65e1 100644 --- a/Source/Common/Util.cpp +++ b/Source/Common/Util.cpp @@ -1,5 +1,6 @@ #include "stdafx.h" #include "Util.h" +#include #include void pjutil::Sleep(uint32_t timeout) diff --git a/Source/Common/md5.cpp b/Source/Common/md5.cpp index c8f4340f5..4189d94da 100644 --- a/Source/Common/md5.cpp +++ b/Source/Common/md5.cpp @@ -40,6 +40,7 @@ */ #include "stdafx.h" +#include // MD5 simple initialization method MD5::MD5() diff --git a/Source/Common/path.cpp b/Source/Common/path.cpp index d21893411..2c2e96c03 100644 --- a/Source/Common/path.cpp +++ b/Source/Common/path.cpp @@ -385,7 +385,7 @@ std::string CPath::GetExtension(void) const //------------------------------------------------------------- // Task : Get current directory //------------------------------------------------------------- -void CPath::GetCurrentDirectory(std::string& rDirectory) const +void CPath::GetLastDirectory(std::string& rDirectory) const { std::string Directory; @@ -394,18 +394,19 @@ void CPath::GetCurrentDirectory(std::string& rDirectory) const GetDirectory(Directory); StripTrailingBackslash(Directory); if(Directory.empty()) + { return; + } - std::string::size_type nDelimiter =Directory.rfind(DIRECTORY_DELIMITER); - - rDirectory =Directory.substr(nDelimiter); + std::string::size_type nDelimiter = Directory.rfind(DIRECTORY_DELIMITER); + rDirectory = Directory.substr(nDelimiter); StripLeadingBackslash(rDirectory); } -std::string CPath::GetCurrentDirectory(void) const +std::string CPath::GetLastDirectory(void) const { std::string rDirecotry; - GetCurrentDirectory(rDirecotry); + GetLastDirectory(rDirecotry); return rDirecotry; } diff --git a/Source/Common/path.h b/Source/Common/path.h index 186e3133b..d42665559 100644 --- a/Source/Common/path.h +++ b/Source/Common/path.h @@ -73,8 +73,8 @@ public: std::string GetNameExtension(void) const; void GetExtension(std::string& rExtension) const; std::string GetExtension(void) const; - void GetCurrentDirectory(std::string& rDrive) const; - std::string GetCurrentDirectory(void) const; + void GetLastDirectory(std::string& rDrive) const; + std::string GetLastDirectory(void) const; void GetFullyQualified(std::string& rFullyQualified) const; void GetComponents(std::string* pDrive = NULL, std::string* pDirectory =NULL, diff --git a/Source/Project64/UserInterface/RomBrowserClass.cpp b/Source/Project64/UserInterface/RomBrowserClass.cpp index 18e4c83de..16e99cf14 100644 --- a/Source/Project64/UserInterface/RomBrowserClass.cpp +++ b/Source/Project64/UserInterface/RomBrowserClass.cpp @@ -527,7 +527,7 @@ bool CRomBrowser::GetRomFileNames(strlist & FileList, const CPath & BaseDirector { if (g_Settings->LoadDword(RomBrowser_Recursive)) { - stdstr CurrentDir = Directory + SearchPath.GetCurrentDirectory() + "\\"; + stdstr CurrentDir = Directory + SearchPath.GetLastDirectory() + "\\"; GetRomFileNames(FileList, BaseDirectory, CurrentDir, InWatchThread); } } @@ -597,7 +597,7 @@ void CRomBrowser::FillRomList(strlist & FileList, const CPath & BaseDirectory, c { if (g_Settings->LoadDword(RomBrowser_Recursive)) { - stdstr CurrentDir = Directory + SearchPath.GetCurrentDirectory() + "\\"; + stdstr CurrentDir = Directory + SearchPath.GetLastDirectory() + "\\"; FillRomList(FileList, BaseDirectory, CurrentDir, lpLastRom); } continue;