mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
219519b578
commit
1b5f2639a0
|
@ -46,7 +46,7 @@ void SymbolMap::Clear() {
|
||||||
|
|
||||||
bool SymbolMap::LoadNocashSym(const char *filename) {
|
bool SymbolMap::LoadNocashSym(const char *filename) {
|
||||||
std::lock_guard<std::recursive_mutex> guard(m_lock);
|
std::lock_guard<std::recursive_mutex> guard(m_lock);
|
||||||
FILE *f = fopen(filename, "r");
|
FILE *f = wxFopen(filename, "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -147,9 +147,7 @@ void ElfObject::readIso(IsoFile& file)
|
||||||
void ElfObject::readFile()
|
void ElfObject::readFile()
|
||||||
{
|
{
|
||||||
int rsize = 0;
|
int rsize = 0;
|
||||||
FILE *f;
|
FILE *f = wxFopen( filename, "rb" );
|
||||||
|
|
||||||
f = fopen( filename.ToUTF8(), "rb" );
|
|
||||||
if (f == NULL) throw Exception::FileNotFound( filename );
|
if (f == NULL) throw Exception::FileNotFound( filename );
|
||||||
|
|
||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
|
|
|
@ -1098,7 +1098,7 @@ void RelocateLogfile()
|
||||||
if( emuLog == NULL )
|
if( emuLog == NULL )
|
||||||
{
|
{
|
||||||
emuLogName = newlogname;
|
emuLogName = newlogname;
|
||||||
emuLog = fopen( emuLogName.ToUTF8(), "wb" );
|
emuLog = wxFopen( emuLogName, "wb" );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGetApp().EnableAllLogging();
|
wxGetApp().EnableAllLogging();
|
||||||
|
|
Loading…
Reference in New Issue