Skip to content

Commit aa1f91f

Browse files
committed
remove "separate savefiles" option. weird and unintuitive.
1 parent f5cc543 commit aa1f91f

5 files changed

Lines changed: 1 addition & 43 deletions

File tree

src/frontend/qt_sdl/Config.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ LegacyEntry LegacyFile[] =
274274
{"LANDevice", 2, "LAN.Device", false},
275275
{"DirectLAN", 1, "LAN.DirectMode", false},
276276

277-
{"SavStaRelocSRAM", 1, "Savestate.RelocSRAM", false},
278-
279277
{"AudioInterp", 0, "Audio.Interpolation", false},
280278
{"AudioBitDepth", 0, "Audio.BitDepth", false},
281279
{"AudioVolume", 0, "Audio.Volume", true},

src/frontend/qt_sdl/EmuInstance.cpp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -759,16 +759,6 @@ bool EmuInstance::loadState(const std::string& filename)
759759
backupState = std::move(backup); // This will clean up any existing backup
760760
assert(backup == nullptr);
761761

762-
if (globalCfg.GetBool("Savestate.RelocSRAM") && ndsSave)
763-
{
764-
previousSaveFile = ndsSave->GetPath();
765-
766-
std::string savefile = filename.substr(lastSep(filename)+1);
767-
savefile = getAssetPath(false, localCfg.GetString("SaveFilePath"), ".sav", savefile);
768-
savefile += instanceFileSuffix();
769-
ndsSave->SetPath(savefile, true);
770-
}
771-
772762
savestateLoaded = true;
773763

774764
return true;
@@ -812,14 +802,6 @@ bool EmuInstance::saveState(const std::string& filename)
812802

813803
Platform::CloseFile(file);
814804

815-
if (globalCfg.GetBool("Savestate.RelocSRAM") && ndsSave)
816-
{
817-
std::string savefile = filename.substr(lastSep(filename)+1);
818-
savefile = getAssetPath(false, localCfg.GetString("SaveFilePath"), ".sav", savefile);
819-
savefile += instanceFileSuffix();
820-
ndsSave->SetPath(savefile, false);
821-
}
822-
823805
return true;
824806
}
825807

@@ -829,15 +811,11 @@ void EmuInstance::undoStateLoad()
829811

830812
// Rewind the backup state and put it in load mode
831813
backupState->Rewind(false);
814+
832815
// pray that this works
833816
// what do we do if it doesn't???
834817
// but it should work.
835818
nds->DoSavestate(backupState.get());
836-
837-
if (ndsSave && (!previousSaveFile.empty()))
838-
{
839-
ndsSave->SetPath(previousSaveFile, true);
840-
}
841819
}
842820

843821

src/frontend/qt_sdl/EmuInstance.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ class EmuInstance
308308

309309
std::unique_ptr<melonDS::Savestate> backupState;
310310
bool savestateLoaded;
311-
std::string previousSaveFile;
312311

313312
std::unique_ptr<melonDS::ARCodeFile> cheatFile;
314313
bool cheatsOn;

src/frontend/qt_sdl/Window.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,6 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
652652
actPathSettings = menu->addAction("Path settings");
653653
connect(actPathSettings, &QAction::triggered, this, &MainWindow::onOpenPathSettings);
654654

655-
{
656-
QMenu * submenu = menu->addMenu("Savestate settings");
657-
658-
actSavestateSRAMReloc = submenu->addAction("Separate savefiles");
659-
actSavestateSRAMReloc->setCheckable(true);
660-
connect(actSavestateSRAMReloc, &QAction::triggered, this, &MainWindow::onChangeSavestateSRAMReloc);
661-
}
662-
663655
menu->addSeparator();
664656

665657
actLimitFramerate = menu->addAction("Limit framerate");
@@ -745,8 +737,6 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
745737
actROMInfo->setEnabled(false);
746738
actRAMInfo->setEnabled(false);
747739

748-
actSavestateSRAMReloc->setChecked(globalCfg.GetBool("Savestate.RelocSRAM"));
749-
750740
actScreenRotation[windowCfg.GetInt("ScreenRotation")]->setChecked(true);
751741

752742
int screenGap = windowCfg.GetInt("ScreenGap");
@@ -2047,11 +2037,6 @@ void MainWindow::onInterfaceSettingsFinished(int res)
20472037
emuThread->emuUnpause();
20482038
}
20492039

2050-
void MainWindow::onChangeSavestateSRAMReloc(bool checked)
2051-
{
2052-
globalCfg.SetBool("Savestate.RelocSRAM", checked);
2053-
}
2054-
20552040
void MainWindow::onChangeScreenSize()
20562041
{
20572042
int factor = ((QAction*)sender())->data().toInt();

src/frontend/qt_sdl/Window.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ private slots:
158158
void onOpenInterfaceSettings();
159159
void onInterfaceSettingsFinished(int res);
160160
void onUpdateInterfaceSettings();
161-
void onChangeSavestateSRAMReloc(bool checked);
162161
void onChangeScreenSize();
163162
void onChangeScreenRotation(QAction* act);
164163
void onChangeScreenGap(QAction* act);
@@ -274,7 +273,6 @@ private slots:
274273
QAction* actFirmwareSettings;
275274
QAction* actPathSettings;
276275
QAction* actInterfaceSettings;
277-
QAction* actSavestateSRAMReloc;
278276
QAction* actScreenSize[4];
279277
QActionGroup* grpScreenRotation;
280278
QAction* actScreenRotation[screenRot_MAX];

0 commit comments

Comments
 (0)