diff --git a/desmume/src/frontend/windows/importSave.cpp b/desmume/src/frontend/windows/importSave.cpp index 42f701db3..cb15592a8 100644 --- a/desmume/src/frontend/windows/importSave.cpp +++ b/desmume/src/frontend/windows/importSave.cpp @@ -179,7 +179,7 @@ bool importSave(HWND hwnd, HINSTANCE hAppInst) ofn.nMaxFile = MAX_PATH; ofn.lpstrDefExt = "sav"; ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - std::string dir = path.getpath(path.BATTERY); + std::string dir = path.getpath(path.SRAM_IMPORT_EXPORT); ofn.lpstrInitialDir = dir.c_str(); if(!GetOpenFileName(&ofn)) @@ -189,8 +189,8 @@ bool importSave(HWND hwnd, HINSTANCE hAppInst) if (res < MAX_SAVE_TYPES) { std::string dir = Path::GetFileDirectoryPath(SavFName); - path.setpath(path.BATTERY, dir); - WritePrivateProfileString(SECTION, BATTERYKEY, dir.c_str(), IniName); + path.setpath(path.SRAM_IMPORT_EXPORT, dir); + WritePrivateProfileString(SECTION, SRAMIMPORTKEY, dir.c_str(), IniName); res = MMU_new.backupDevice.importData(SavFName, save_types[res+1].size); if (res) @@ -219,15 +219,15 @@ bool exportSave(HWND hwnd, HINSTANCE hAppInst) ofn.nMaxFile = MAX_PATH; ofn.lpstrDefExt = "sav"; ofn.Flags = OFN_NOREADONLYRETURN | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT; - std::string dir = path.getpath(path.BATTERY); + std::string dir = path.getpath(path.SRAM_IMPORT_EXPORT); ofn.lpstrInitialDir = dir.c_str(); if (!GetSaveFileName(&ofn)) return true; dir = Path::GetFileDirectoryPath(SavFName); - path.setpath(path.BATTERY, dir); - WritePrivateProfileString(SECTION, BATTERYKEY, dir.c_str(), IniName); + path.setpath(path.SRAM_IMPORT_EXPORT, dir); + WritePrivateProfileString(SECTION, SRAMIMPORTKEY, dir.c_str(), IniName); if (ofn.nFilterIndex == 2) strcat(SavFName, "*"); diff --git a/desmume/src/frontend/windows/pathsettings.cpp b/desmume/src/frontend/windows/pathsettings.cpp index 4c4297eea..912e828f1 100644 --- a/desmume/src/frontend/windows/pathsettings.cpp +++ b/desmume/src/frontend/windows/pathsettings.cpp @@ -107,6 +107,7 @@ void WritePathSettings() { WritePrivateProfileString(SECTION, ROMKEY, path.pathToRoms, IniName); WritePrivateProfileString(SECTION, BATTERYKEY, path.pathToBattery, IniName); + WritePrivateProfileString(SECTION, SRAMIMPORTKEY, path.pathToSramImportExport, IniName); WritePrivateProfileString(SECTION, STATEKEY, path.pathToStates, IniName); WritePrivateProfileString(SECTION, STATESLOTKEY, path.pathToStateSlots, IniName); WritePrivateProfileString(SECTION, SCREENSHOTKEY, path.pathToScreenshots, IniName); diff --git a/desmume/src/path.cpp b/desmume/src/path.cpp index bd0aa00c8..9646fcc38 100644 --- a/desmume/src/path.cpp +++ b/desmume/src/path.cpp @@ -253,6 +253,7 @@ void PathInfo::ReadPathSettings() ReadKey(pathToRoms, ROMKEY); ReadKey(pathToBattery, BATTERYKEY); + ReadKey(pathToSramImportExport, SRAMIMPORTKEY); ReadKey(pathToStates, STATEKEY); ReadKey(pathToStateSlots, STATESLOTKEY); ReadKey(pathToScreenshots, SCREENSHOTKEY); @@ -293,6 +294,9 @@ void PathInfo::SwitchPath(Action action, KnownPath path, char *buffer) case BATTERY: pathToCopy = pathToBattery; break; + case SRAM_IMPORT_EXPORT: + pathToCopy = pathToSramImportExport; + break; case STATES: pathToCopy = pathToStates; break; diff --git a/desmume/src/path.h b/desmume/src/path.h index a06cc307b..c56baed4d 100644 --- a/desmume/src/path.h +++ b/desmume/src/path.h @@ -72,6 +72,7 @@ public: #define ROMKEY "Roms" #define BATTERYKEY "Battery" + #define SRAMIMPORTKEY "SramImportExport" #define STATEKEY "States" #define STATESLOTKEY "StateSlots" #define SCREENSHOTKEY "Screenshots" @@ -94,6 +95,7 @@ public: FIRSTKNOWNPATH = 0, ROMS = 0, BATTERY, + SRAM_IMPORT_EXPORT, STATES, STATE_SLOTS, SCREENSHOTS, @@ -108,6 +110,7 @@ public: char pathToRoms[MAX_PATH]; char pathToBattery[MAX_PATH]; + char pathToSramImportExport[MAX_PATH]; char pathToStates[MAX_PATH]; char pathToStateSlots[MAX_PATH]; char pathToScreenshots[MAX_PATH];