mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-10-09 12:06:08 +02:00
RMG: expose Game_CountPerOpDenomPot to SettingsDialog
This commit is contained in:
1 parent
2e2c16a229
commit
cd0951efff
2 files changed
+159
-75
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,79 +77,79 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_92">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_60">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_92">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_60">
|
||||
<property name="text">
|
||||
<string>Overclocking Factor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="coreOverclockingFactorComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Overclocking Factor</string>
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="coreOverclockingFactorComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="coreOverrideGameSettingsGroup">
|
||||
@@ -571,6 +571,81 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Overclocking Factor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="gameOverclockingFactorComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="gameRandomizeTimingCheckBox">
|
||||
<property name="text">
|
||||
@@ -582,14 +657,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_9">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>296</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
Reference in new issue
Block a user