From 6a65305e742c58a24a8555493eac88686383e00a Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 20 Nov 2018 14:11:32 +1030 Subject: [PATCH] [Project64] More fixing for android --- Source/Project64-core/N64System/Mips/Eeprom.cpp | 4 +++- Source/Project64-core/N64System/Mips/FlashRam.cpp | 4 +++- Source/Project64-core/N64System/Mips/Mempak.cpp | 4 +++- Source/Project64-core/N64System/Mips/Sram.cpp | 4 +++- Source/Project64-core/N64System/N64Class.cpp | 8 ++++++-- .../Settings/SettingType/SettingsType-Application.cpp | 2 ++ 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Source/Project64-core/N64System/Mips/Eeprom.cpp b/Source/Project64-core/N64System/Mips/Eeprom.cpp index bd57ba471..96062180f 100644 --- a/Source/Project64-core/N64System/Mips/Eeprom.cpp +++ b/Source/Project64-core/N64System/Mips/Eeprom.cpp @@ -148,7 +148,9 @@ void CEeprom::LoadEeprom() { FileName.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (!FileName.DirectoryExists()) { diff --git a/Source/Project64-core/N64System/Mips/FlashRam.cpp b/Source/Project64-core/N64System/Mips/FlashRam.cpp index 2d31ec994..03de81eda 100644 --- a/Source/Project64-core/N64System/Mips/FlashRam.cpp +++ b/Source/Project64-core/N64System/Mips/FlashRam.cpp @@ -125,7 +125,9 @@ bool CFlashram::LoadFlashram() { FileName.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (!FileName.DirectoryExists()) { diff --git a/Source/Project64-core/N64System/Mips/Mempak.cpp b/Source/Project64-core/N64System/Mips/Mempak.cpp index 2e1a53e36..44c670f71 100644 --- a/Source/Project64-core/N64System/Mips/Mempak.cpp +++ b/Source/Project64-core/N64System/Mips/Mempak.cpp @@ -34,7 +34,9 @@ void CMempak::LoadMempak(int32_t Control, bool Create) { MempakPath.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - MempakPath.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + MempakPath.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (!Create && !MempakPath.Exists()) { diff --git a/Source/Project64-core/N64System/Mips/Sram.cpp b/Source/Project64-core/N64System/Mips/Sram.cpp index 307306939..61d155a0b 100644 --- a/Source/Project64-core/N64System/Mips/Sram.cpp +++ b/Source/Project64-core/N64System/Mips/Sram.cpp @@ -28,7 +28,9 @@ bool CSram::LoadSram() { FileName.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (!FileName.DirectoryExists()) { diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index 72bffb968..d8ab2da09 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -1547,7 +1547,9 @@ bool CN64System::SaveState() { SaveFile.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - SaveFile.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + SaveFile.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif SaveFile.SetName(g_Settings->LoadStringVal(Rdb_GoodName).c_str()); g_Settings->SaveDword(Game_LastSaveSlot, g_Settings->LoadDword(Game_CurrentSaveState)); } @@ -1703,7 +1705,9 @@ bool CN64System::LoadState() { FileName.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); } - FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#ifdef _WIN32 + FileName.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (g_Settings->LoadDword(Game_CurrentSaveState) != 0) { FileName.SetNameExtension(stdstr_f("%s.pj%d", g_Settings->LoadStringVal(Rdb_GoodName).c_str(), g_Settings->LoadDword(Game_CurrentSaveState)).c_str()); diff --git a/Source/Project64-core/Settings/SettingType/SettingsType-Application.cpp b/Source/Project64-core/Settings/SettingType/SettingsType-Application.cpp index 73319e776..e647091fc 100644 --- a/Source/Project64-core/Settings/SettingType/SettingsType-Application.cpp +++ b/Source/Project64-core/Settings/SettingType/SettingsType-Application.cpp @@ -92,7 +92,9 @@ void CSettingTypeApplication::Initialize(const char * /*AppName*/) delete m_SettingsIniFile; } CPath SettingPath(SettingsFile.c_str()); +#ifdef _WIN32 SettingPath.NormalizePath(CPath(CPath::MODULE_DIRECTORY)); +#endif if (!SettingPath.DirectoryExists()) { SettingPath.DirectoryCreate();