configuration_shared: Break up tracker structs to respective classes

One less global variable.
This commit is contained in:
lat9nq 2020-07-14 13:55:47 -04:00
parent 54f4eba5a9
commit 3676efbf03
12 changed files with 58 additions and 49 deletions

View file

@ -148,7 +148,7 @@ void ConfigureSystem::ApplyConfiguration() {
ui->combo_time_zone);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.sound_index, ui->combo_sound);
switch (ConfigurationShared::trackers.use_rng_seed) {
switch (trackers.use_rng_seed) {
case ConfigurationShared::CheckState::On:
case ConfigurationShared::CheckState::Off:
Settings::values.rng_seed.SetGlobal(false);
@ -168,7 +168,7 @@ void ConfigureSystem::ApplyConfiguration() {
break;
}
switch (ConfigurationShared::trackers.use_custom_rtc) {
switch (trackers.use_custom_rtc) {
case ConfigurationShared::CheckState::On:
case ConfigurationShared::CheckState::Off:
Settings::values.custom_rtc.SetGlobal(false);
@ -238,10 +238,10 @@ void ConfigureSystem::SetupPerGameUI() {
Settings::values.rng_seed.UsingGlobal(),
Settings::values.rng_seed.GetValue().has_value(),
Settings::values.rng_seed.GetValue(true).has_value(),
ConfigurationShared::trackers.use_rng_seed);
trackers.use_rng_seed);
ConfigurationShared::SetColoredTristate(ui->custom_rtc_checkbox, "custom_rtc_checkbox",
Settings::values.custom_rtc.UsingGlobal(),
Settings::values.custom_rtc.GetValue().has_value(),
Settings::values.custom_rtc.GetValue(true).has_value(),
ConfigurationShared::trackers.use_custom_rtc);
trackers.use_custom_rtc);
}