qt: Allow toggling whether to enter system setup on home menu boot. (#6574)

This commit is contained in:
Steveice10 2023-05-31 01:56:35 -07:00 committed by GitHub
parent 691e09473e
commit 4ddb2116bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 163 additions and 120 deletions

View file

@ -337,6 +337,10 @@ void ConfigureSystem::ReadSystemSettings() {
country_code = cfg->GetCountryCode();
ui->combo_country->setCurrentIndex(ui->combo_country->findData(country_code));
// set whether system setup is needed
system_setup = cfg->IsSystemSetupNeeded();
ui->toggle_system_setup->setChecked(system_setup);
// set the console id
u64 console_id = cfg->GetConsoleUniqueId();
ui->label_console_id->setText(
@ -390,6 +394,13 @@ void ConfigureSystem::ApplyConfiguration() {
modified = true;
}
// apply whether system setup is needed
bool new_system_setup = static_cast<u8>(ui->toggle_system_setup->isChecked());
if (system_setup != new_system_setup) {
cfg->SetSystemSetupNeeded(new_system_setup);
modified = true;
}
// apply play coin
u16 new_play_coin = static_cast<u16>(ui->spinBox_play_coins->value());
if (play_coin != new_play_coin) {
@ -523,6 +534,7 @@ void ConfigureSystem::SetupPerGameUI() {
ui->label_init_time_offset->setVisible(false);
ui->edit_init_time_offset_days->setVisible(false);
ui->edit_init_time_offset_time->setVisible(false);
ui->toggle_system_setup->setVisible(false);
ui->button_regenerate_console_id->setVisible(false);
// Apps can change the state of the plugin loader, so plugins load
// to a chainloaded app with specific parameters. Don't allow