diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_per_game.cpp | 18 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game.h | 3 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index c54d7e76f..7ec0bf9d3 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp | |||
| @@ -42,22 +42,22 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st | |||
| 42 | std::vector<VkDeviceInfo::Record>& vk_device_records, | 42 | std::vector<VkDeviceInfo::Record>& vk_device_records, |
| 43 | Core::System& system_) | 43 | Core::System& system_) |
| 44 | : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, | 44 | : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, |
| 45 | system{system_}, group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} { | 45 | system{system_}, tab_group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} { |
| 46 | const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); | 46 | const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); |
| 47 | const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()) | 47 | const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()) |
| 48 | : fmt::format("{:016X}", title_id); | 48 | : fmt::format("{:016X}", title_id); |
| 49 | game_config = std::make_unique<Config>(config_file_name, Config::ConfigType::PerGameConfig); | 49 | game_config = std::make_unique<Config>(config_file_name, Config::ConfigType::PerGameConfig); |
| 50 | 50 | ||
| 51 | addons_tab = std::make_unique<ConfigurePerGameAddons>(system_, this); | 51 | addons_tab = std::make_unique<ConfigurePerGameAddons>(system_, this); |
| 52 | audio_tab = std::make_unique<ConfigureAudio>(system_, group, this); | 52 | audio_tab = std::make_unique<ConfigureAudio>(system_, tab_group, this); |
| 53 | cpu_tab = std::make_unique<ConfigureCpu>(system_, group, this); | 53 | cpu_tab = std::make_unique<ConfigureCpu>(system_, tab_group, this); |
| 54 | general_tab = std::make_unique<ConfigureGeneral>(system_, group, this); | 54 | general_tab = std::make_unique<ConfigureGeneral>(system_, tab_group, this); |
| 55 | graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, group, this); | 55 | graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, this); |
| 56 | graphics_tab = std::make_unique<ConfigureGraphics>( | 56 | graphics_tab = std::make_unique<ConfigureGraphics>( |
| 57 | system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); }, group, | 57 | system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); }, |
| 58 | this); | 58 | tab_group, this); |
| 59 | input_tab = std::make_unique<ConfigureInputPerGame>(system_, game_config.get(), this); | 59 | input_tab = std::make_unique<ConfigureInputPerGame>(system_, game_config.get(), this); |
| 60 | system_tab = std::make_unique<ConfigureSystem>(system_, group, this); | 60 | system_tab = std::make_unique<ConfigureSystem>(system_, tab_group, this); |
| 61 | 61 | ||
| 62 | ui->setupUi(this); | 62 | ui->setupUi(this); |
| 63 | 63 | ||
| @@ -90,7 +90,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st | |||
| 90 | ConfigurePerGame::~ConfigurePerGame() = default; | 90 | ConfigurePerGame::~ConfigurePerGame() = default; |
| 91 | 91 | ||
| 92 | void ConfigurePerGame::ApplyConfiguration() { | 92 | void ConfigurePerGame::ApplyConfiguration() { |
| 93 | for (const auto tab : *group) { | 93 | for (const auto tab : *tab_group) { |
| 94 | tab->ApplyConfiguration(); | 94 | tab->ApplyConfiguration(); |
| 95 | } | 95 | } |
| 96 | addons_tab->ApplyConfiguration(); | 96 | addons_tab->ApplyConfiguration(); |
diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index 5326e70e6..9fceff414 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h | |||
| @@ -75,7 +75,8 @@ private: | |||
| 75 | std::unique_ptr<Config> game_config; | 75 | std::unique_ptr<Config> game_config; |
| 76 | 76 | ||
| 77 | Core::System& system; | 77 | Core::System& system; |
| 78 | std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group; | 78 | std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> tab_group; |
| 79 | |||
| 79 | std::unique_ptr<ConfigurePerGameAddons> addons_tab; | 80 | std::unique_ptr<ConfigurePerGameAddons> addons_tab; |
| 80 | std::unique_ptr<ConfigureAudio> audio_tab; | 81 | std::unique_ptr<ConfigureAudio> audio_tab; |
| 81 | std::unique_ptr<ConfigureCpu> cpu_tab; | 82 | std::unique_ptr<ConfigureCpu> cpu_tab; |