mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-10 19:10:01 +00:00
Merge pull request #7674 from lat9nq/fix-custom-highlight
configure_per_game: Initialize tabs after loading custom configuration
This commit is contained in:
commit
f46e1b8ca2
1 changed files with 9 additions and 15 deletions
|
@ -45,20 +45,21 @@
|
||||||
ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name,
|
ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name,
|
||||||
Core::System& system_)
|
Core::System& system_)
|
||||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()),
|
: QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()),
|
||||||
title_id(title_id), system{system_}, addons_tab{std::make_unique<ConfigurePerGameAddons>(
|
title_id(title_id), system{system_} {
|
||||||
system_, this)},
|
|
||||||
audio_tab{std::make_unique<ConfigureAudio>(system_, this)},
|
|
||||||
cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},
|
|
||||||
general_tab{std::make_unique<ConfigureGeneral>(system_, this)},
|
|
||||||
graphics_tab{std::make_unique<ConfigureGraphics>(system_, this)},
|
|
||||||
graphics_advanced_tab{std::make_unique<ConfigureGraphicsAdvanced>(system_, this)},
|
|
||||||
system_tab{std::make_unique<ConfigureSystem>(system_, this)} {
|
|
||||||
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
|
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
|
||||||
const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename())
|
const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename())
|
||||||
: fmt::format("{:016X}", title_id);
|
: fmt::format("{:016X}", title_id);
|
||||||
game_config =
|
game_config =
|
||||||
std::make_unique<Config>(system, config_file_name, Config::ConfigType::PerGameConfig);
|
std::make_unique<Config>(system, config_file_name, Config::ConfigType::PerGameConfig);
|
||||||
|
|
||||||
|
addons_tab = std::make_unique<ConfigurePerGameAddons>(system_, this);
|
||||||
|
audio_tab = std::make_unique<ConfigureAudio>(system_, this);
|
||||||
|
cpu_tab = std::make_unique<ConfigureCpu>(system_, this);
|
||||||
|
general_tab = std::make_unique<ConfigureGeneral>(system_, this);
|
||||||
|
graphics_tab = std::make_unique<ConfigureGraphics>(system_, this);
|
||||||
|
graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, this);
|
||||||
|
system_tab = std::make_unique<ConfigureSystem>(system_, this);
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
ui->tabWidget->addTab(addons_tab.get(), tr("Add-Ons"));
|
ui->tabWidget->addTab(addons_tab.get(), tr("Add-Ons"));
|
||||||
|
@ -187,11 +188,4 @@ void ConfigurePerGame::LoadConfiguration() {
|
||||||
|
|
||||||
const auto valueText = ReadableByteSize(file->GetSize());
|
const auto valueText = ReadableByteSize(file->GetSize());
|
||||||
ui->display_size->setText(valueText);
|
ui->display_size->setText(valueText);
|
||||||
|
|
||||||
general_tab->SetConfiguration();
|
|
||||||
cpu_tab->SetConfiguration();
|
|
||||||
system_tab->SetConfiguration();
|
|
||||||
graphics_tab->SetConfiguration();
|
|
||||||
graphics_advanced_tab->SetConfiguration();
|
|
||||||
audio_tab->SetConfiguration();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue