From cd0951efff2622c6981fa8dbcb60e15b516fb8a3 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Thu, 10 Nov 2022 17:53:48 +0100 Subject: [PATCH] RMG: expose Game_CountPerOpDenomPot to SettingsDialog --- .../UserInterface/Dialog/SettingsDialog.cpp | 13 +- .../UserInterface/Dialog/SettingsDialog.ui | 221 ++++++++++++------ 2 files changed, 159 insertions(+), 75 deletions(-) diff --git a/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp b/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp index 23800c1c..2e29b76f 100644 --- a/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp +++ b/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp @@ -204,14 +204,16 @@ void SettingsDialog::loadGameSettings(void) void SettingsDialog::loadGameCoreSettings(void) { bool overrideEnabled, randomizeInterrupt; - int cpuEmulator = 0; + int cpuEmulator = 0, overclockingFactor = 0; overrideEnabled = CoreSettingsGetBoolValue(SettingsID::Game_OverrideCoreSettings, this->gameSection); cpuEmulator = CoreSettingsGetIntValue(SettingsID::Game_CPU_Emulator, this->gameSection); + overclockingFactor = CoreSettingsGetIntValue(SettingsID::Game_CountPerOpDenomPot, this->gameSection); randomizeInterrupt = CoreSettingsGetBoolValue(SettingsID::Game_RandomizeInterrupt, this->gameSection); gameOverrideCoreSettingsGroupBox->setChecked(overrideEnabled); gameCoreCpuEmulatorComboBox->setCurrentIndex(cpuEmulator); + gameOverclockingFactorComboBox->setCurrentIndex(overclockingFactor); gameRandomizeTimingCheckBox->setChecked(randomizeInterrupt); } @@ -380,14 +382,16 @@ void SettingsDialog::loadDefaultGameSettings(void) void SettingsDialog::loadDefaultGameCoreSettings(void) { bool overrideEnabled, randomizeInterrupt; - int cpuEmulator = 0; + int cpuEmulator = 0, overclockingFactor = 0; overrideEnabled = CoreSettingsGetDefaultBoolValue(SettingsID::Game_OverrideCoreSettings); cpuEmulator = CoreSettingsGetDefaultIntValue(SettingsID::Game_CPU_Emulator); + overclockingFactor = CoreSettingsGetDefaultIntValue(SettingsID::Game_CountPerOpDenomPot); randomizeInterrupt = CoreSettingsGetDefaultBoolValue(SettingsID::Game_RandomizeInterrupt); gameOverrideCoreSettingsGroupBox->setChecked(overrideEnabled); gameCoreCpuEmulatorComboBox->setCurrentIndex(cpuEmulator); + gameOverclockingFactorComboBox->setCurrentIndex(overclockingFactor); gameRandomizeTimingCheckBox->setChecked(randomizeInterrupt); } @@ -513,21 +517,26 @@ void SettingsDialog::saveGameCoreSettings(void) bool overrideEnabled, randomizeInterrupt; bool defaultOverrideEnabled, defaultRandomizeInterrupt; int cpuEmulator = 0, defaultCpuEmulator; + int overclockingFactor = 0, defaultoverclockingFactor; overrideEnabled = gameOverrideCoreSettingsGroupBox->isChecked(); cpuEmulator = gameCoreCpuEmulatorComboBox->currentIndex(); + overclockingFactor = gameOverclockingFactorComboBox->currentIndex(); randomizeInterrupt = gameRandomizeTimingCheckBox->isChecked(); defaultOverrideEnabled = CoreSettingsGetDefaultBoolValue(SettingsID::Game_OverrideCoreSettings); defaultRandomizeInterrupt = CoreSettingsGetDefaultBoolValue(SettingsID::Game_RandomizeInterrupt); defaultCpuEmulator = CoreSettingsGetDefaultIntValue(SettingsID::Game_CPU_Emulator); + defaultoverclockingFactor = CoreSettingsGetDefaultIntValue(SettingsID::Game_CountPerOpDenomPot); if ((defaultOverrideEnabled != overrideEnabled) || (defaultCpuEmulator != cpuEmulator) || + (defaultoverclockingFactor != overclockingFactor) || (defaultRandomizeInterrupt != randomizeInterrupt)) { CoreSettingsSetValue(SettingsID::Game_OverrideCoreSettings, this->gameSection, overrideEnabled); CoreSettingsSetValue(SettingsID::Game_CPU_Emulator, this->gameSection, cpuEmulator); + CoreSettingsSetValue(SettingsID::Game_CountPerOpDenomPot, this->gameSection, overclockingFactor); CoreSettingsSetValue(SettingsID::Game_RandomizeInterrupt, this->gameSection, randomizeInterrupt); } } diff --git a/Source/RMG/UserInterface/Dialog/SettingsDialog.ui b/Source/RMG/UserInterface/Dialog/SettingsDialog.ui index 7155c961..22ac579f 100644 --- a/Source/RMG/UserInterface/Dialog/SettingsDialog.ui +++ b/Source/RMG/UserInterface/Dialog/SettingsDialog.ui @@ -77,79 +77,79 @@ - - - + + + + + Overclocking Factor + + + + + + - Overclocking Factor + 0 - - - - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + @@ -571,6 +571,81 @@ + + + + + + Overclocking Factor + + + + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + + @@ -582,14 +657,14 @@ - + Qt::Vertical 20 - 296 + 40