more small fry...

This commit is contained in:
Arisotura 2024-05-24 20:32:28 +02:00
parent f0b81a9050
commit 03d5c2516c
4 changed files with 8 additions and 16 deletions

View File

@ -78,14 +78,10 @@ int MPRecvTimeout;
std::string LANDevice;
bool DirectLAN;
bool SavestateRelocSRAM;
std::string SaveFilePath;
std::string SavestatePath;
std::string CheatFilePath;
bool EnableCheats;
bool MouseHide;
int MouseHideSeconds;
@ -321,7 +317,7 @@ LegacyEntry LegacyFile[] =
{"LANDevice", 2, "LAN.Device", false},
{"DirectLAN", 1, "LAN.DirectMode", false},
{"SavStaRelocSRAM", 1, "SaveState.RelocSRAM", false},
{"SavStaRelocSRAM", 1, "Savestate.RelocSRAM", false},
{"AudioInterp", 0, "Audio.Interpolation", false},
{"AudioBitDepth", 0, "Audio.BitDepth", false},

View File

@ -192,14 +192,10 @@ extern int MPRecvTimeout;
extern std::string LANDevice;
extern bool DirectLAN;
extern bool SavestateRelocSRAM;
extern std::string SaveFilePath;
extern std::string SavestatePath;
extern std::string CheatFilePath;
extern bool EnableCheats;
extern bool MouseHide;
extern int MouseHideSeconds;
extern bool PauseLostFocus;

View File

@ -490,7 +490,7 @@ bool EmuInstance::loadState(const std::string& filename)
backupState = std::move(backup); // This will clean up any existing backup
assert(backup == nullptr);
if (Config::SavestateRelocSRAM && ndsSave)
if (globalCfg.GetBool("Savestate.RelocSRAM") && ndsSave)
{
previousSaveFile = ndsSave->GetPath();
@ -543,7 +543,7 @@ bool EmuInstance::saveState(const std::string& filename)
fclose(file);
if (Config::SavestateRelocSRAM && ndsSave)
if (globalCfg.GetBool("Savestate.RelocSRAM") && ndsSave)
{
std::string savefile = filename.substr(lastSep(filename)+1);
savefile = getAssetPath(false, Config::SaveFilePath, ".sav", savefile);

View File

@ -646,12 +646,12 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
actSetupCheats->setEnabled(false);
actTitleManager->setEnabled(!emuInstance->globalCfg.GetString("DSi.NANDPath").empty());
actEnableCheats->setChecked(Config::EnableCheats);
actEnableCheats->setChecked(localCfg.GetBool("EnableCheats"));
actROMInfo->setEnabled(false);
actRAMInfo->setEnabled(false);
actSavestateSRAMReloc->setChecked(Config::SavestateRelocSRAM);
actSavestateSRAMReloc->setChecked(globalCfg.GetBool("Savestate.RelocSRAM"));
actScreenRotation[Config::ScreenRotation]->setChecked(true);
@ -1636,8 +1636,8 @@ void MainWindow::onOpenPowerManagement()
void MainWindow::onEnableCheats(bool checked)
{
Config::EnableCheats = checked?1:0;
emuInstance->enableCheats(Config::EnableCheats != 0);
localCfg.SetBool("EnableCheats", checked);
emuInstance->enableCheats(checked);
}
void MainWindow::onSetupCheats()
@ -1885,7 +1885,7 @@ void MainWindow::onInterfaceSettingsFinished(int res)
void MainWindow::onChangeSavestateSRAMReloc(bool checked)
{
Config::SavestateRelocSRAM = checked?1:0;
globalCfg.SetBool("Savestate.RelocSRAM", checked);
}
void MainWindow::onChangeScreenSize()