pcsx2:windows: Fix path issues

Fixes some issues with opening files if the path contains characters not
present in the current codepage.
This commit is contained in:
Jonathan Li 2018-07-16 01:53:48 +01:00
parent 219519b578
commit 1b5f2639a0
3 changed files with 3 additions and 5 deletions

View File

@ -46,7 +46,7 @@ void SymbolMap::Clear() {
bool SymbolMap::LoadNocashSym(const char *filename) {
std::lock_guard<std::recursive_mutex> guard(m_lock);
FILE *f = fopen(filename, "r");
FILE *f = wxFopen(filename, "r");
if (!f)
return false;

View File

@ -147,9 +147,7 @@ void ElfObject::readIso(IsoFile& file)
void ElfObject::readFile()
{
int rsize = 0;
FILE *f;
f = fopen( filename.ToUTF8(), "rb" );
FILE *f = wxFopen( filename, "rb" );
if (f == NULL) throw Exception::FileNotFound( filename );
fseek(f, 0, SEEK_SET);

View File

@ -1098,7 +1098,7 @@ void RelocateLogfile()
if( emuLog == NULL )
{
emuLogName = newlogname;
emuLog = fopen( emuLogName.ToUTF8(), "wb" );
emuLog = wxFopen( emuLogName, "wb" );
}
wxGetApp().EnableAllLogging();