forked from eden-emu/eden
		
	configure_graphics_advance: Generate UI at runtime
We can iterate through the AdvancedGraphics settings and generate the UI during runtime. This doesn't help runtime efficiency, but it helps a ton in reducing the amount of work a developer needs in order to add a new setting.
This commit is contained in:
		
							parent
							
								
									b11b4be7cb
								
							
						
					
					
						commit
						a007ac6b9c
					
				
					 15 changed files with 449 additions and 400 deletions
				
			
		|  | @ -41,8 +41,10 @@ | |||
| ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name, | ||||
|                                    std::vector<VkDeviceInfo::Record>& vk_device_records, | ||||
|                                    Core::System& system_) | ||||
|     : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, | ||||
|       system{system_}, tab_group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} { | ||||
|     : QDialog(parent), | ||||
|       ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, system{system_}, | ||||
|       translations{ConfigurationShared::InitializeTranslations(this)}, | ||||
|       tab_group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} { | ||||
|     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()) | ||||
|                                                 : fmt::format("{:016X}", title_id); | ||||
|  | @ -52,7 +54,8 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st | |||
|     audio_tab = std::make_unique<ConfigureAudio>(system_, tab_group, this); | ||||
|     cpu_tab = std::make_unique<ConfigureCpu>(system_, tab_group, this); | ||||
|     general_tab = std::make_unique<ConfigureGeneral>(system_, tab_group, this); | ||||
|     graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, this); | ||||
|     graphics_advanced_tab = | ||||
|         std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, *translations, this); | ||||
|     graphics_tab = std::make_unique<ConfigureGraphics>( | ||||
|         system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); }, | ||||
|         tab_group, this); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 lat9nq
						lat9nq