GUI: Speed up GUI loading by caching game sizes (#2130)

* Add show game size toggle

* Fix (#7)

* Fix

I removed the gameSizeCheckBox from the 'Emulator' group and put it in 'GUI settings'
hLayoutTrophy which contains the Trophy information was inside the GUIMusicLayout, so I fixed that too.

* TR

* Use cached sizes if the feature is enabled

---------

Co-authored-by: DanielSvoboda <daniel.svoboda@hotmail.com>
This commit is contained in:
kalaposfos13 2025-01-12 21:31:05 +01:00 committed by GitHub
parent c6ab149c56
commit 4f2f9494b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 239 additions and 68 deletions

View file

@ -315,6 +315,7 @@ void SettingsDialog::LoadValuesFromConfig() {
toml::find_or<std::string>(data, "General", "FullscreenMode", "Borderless")));
ui->separateUpdatesCheckBox->setChecked(
toml::find_or<bool>(data, "General", "separateUpdateEnabled", false));
ui->gameSizeCheckBox->setChecked(toml::find_or<bool>(data, "GUI", "loadGameSizeEnabled", true));
ui->showSplashCheckBox->setChecked(toml::find_or<bool>(data, "General", "showSplash", false));
ui->logTypeComboBox->setCurrentText(
QString::fromStdString(toml::find_or<std::string>(data, "General", "logType", "async")));
@ -568,6 +569,7 @@ void SettingsDialog::UpdateSettings() {
Config::setDumpShaders(ui->dumpShadersCheckBox->isChecked());
Config::setNullGpu(ui->nullGpuCheckBox->isChecked());
Config::setSeparateUpdateEnabled(ui->separateUpdatesCheckBox->isChecked());
Config::setLoadGameSizeEnabled(ui->gameSizeCheckBox->isChecked());
Config::setShowSplash(ui->showSplashCheckBox->isChecked());
Config::setDebugDump(ui->debugDump->isChecked());
Config::setVkValidation(ui->vkValidationCheckBox->isChecked());