Hide and disable update checker on custom builds

This commit is contained in:
Cacodemon345
2025-07-11 15:36:09 +06:00
parent f4f6bbc465
commit 4c72a0f721
4 changed files with 20 additions and 4 deletions

View File

@@ -44,8 +44,12 @@ VMManagerPreferences(QWidget *parent) : ui(new Ui::VMManagerPreferences)
}
// TODO: Defaults
#if EMU_BUILD_NUM != 0
const auto configUpdateCheck = config->getStringValue("update_check").toInt();
ui->updateCheckBox->setChecked(configUpdateCheck);
#else
ui->updateCheckBox->setVisible(false);
#endif
const auto useRegexSearch = config->getStringValue("regex_search").toInt();
ui->regexSearchCheckBox->setChecked(useRegexSearch);
@@ -70,7 +74,9 @@ VMManagerPreferences::accept()
{
const auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General);
config->setStringValue("system_directory", ui->systemDirectory->text());
#if EMU_BUILD_NUM != 0
config->setStringValue("update_check", ui->updateCheckBox->isChecked() ? "1" : "0");
#endif
config->setStringValue("regex_search", ui->regexSearchCheckBox->isChecked() ? "1" : "0");
QDialog::accept();
}
@@ -79,4 +85,4 @@ void
VMManagerPreferences::reject()
{
QDialog::reject();
}
}