From 283d4fa57c7489acf2d63b2729e299e72b7c811d Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Fri, 12 Jun 2015 18:11:43 +0100 Subject: [PATCH] Use wc_str for Windows only code This fixes the build for wxWidgets 3.0. The paths are Windows specific, so c_str and WX_STR already evaluate to a wide string in wxWidgets 2.8. --- pcsx2/CDVD/CompressedFileReaderUtils.h | 2 +- pcsx2/windows/SamplProf.cpp | 2 +- plugins/spu2-x/src/Windows/SndOut_DSound.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcsx2/CDVD/CompressedFileReaderUtils.h b/pcsx2/CDVD/CompressedFileReaderUtils.h index 6a45100549..00f61fd929 100644 --- a/pcsx2/CDVD/CompressedFileReaderUtils.h +++ b/pcsx2/CDVD/CompressedFileReaderUtils.h @@ -24,7 +24,7 @@ // Maybe some day we'll convert all file related ops to wxWidgets, which means also the // instances at zlib_indexed.h (which use plain stdio FILE*) #ifdef WIN32 -# define PX_wfilename(name_wxstr) (WX_STR(name_wxstr)) +# define PX_wfilename(name_wxstr) (name_wxstr.wc_str()) # define PX_fopen_rb(name_wxstr) (_wfopen(PX_wfilename(name_wxstr), L"rb")) #else # define PX_wfilename(name_wxstr) (name_wxstr.mbc_str()) diff --git a/pcsx2/windows/SamplProf.cpp b/pcsx2/windows/SamplProf.cpp index e7e3e0fcaf..024fbee9d9 100644 --- a/pcsx2/windows/SamplProf.cpp +++ b/pcsx2/windows/SamplProf.cpp @@ -216,7 +216,7 @@ static void MapUnknownSource( uint Eip ) return; } - Module tmp((sz==0) ? modulenam.c_str() : NULL, (void*)Eip); + Module tmp((sz==0) ? modulenam.wc_str() : NULL, (void*)Eip); tmp.ticks++; ProfUnknownHash.insert(MapType::value_type(modulenam, tmp)); diff --git a/plugins/spu2-x/src/Windows/SndOut_DSound.cpp b/plugins/spu2-x/src/Windows/SndOut_DSound.cpp index 86f13f5db0..d173075f6c 100644 --- a/plugins/spu2-x/src/Windows/SndOut_DSound.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_DSound.cpp @@ -297,7 +297,7 @@ private: tSel=-1; for(int i=0;i