mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-03-26 20:18:29 -06:00
config: Retain Vulkan device selection from previous config format
This commit is contained in:
parent
2096c434de
commit
4ca4d1caed
@ -127,7 +127,11 @@ XMLConfigParser CemuConfig::Load(XMLConfigParser& parser)
|
||||
// graphics
|
||||
auto graphic = parser.get("Graphic");
|
||||
graphic_api = graphic.get("api", kOpenGL);
|
||||
graphic.get("vkDevice", vk_graphic_device_uuid);
|
||||
graphic.get("device", legacy_graphic_device_uuid);
|
||||
if (graphic.get("vkDevice").valid())
|
||||
graphic.get("vkDevice", vk_graphic_device_uuid);
|
||||
else
|
||||
vk_graphic_device_uuid = legacy_graphic_device_uuid;
|
||||
mtl_graphic_device_uuid = graphic.get("mtlDevice", 0);
|
||||
vsync = graphic.get("VSync", 0);
|
||||
overrideAppGammaPreference = graphic.get("OverrideAppGammaPreference", false);
|
||||
@ -359,6 +363,7 @@ XMLConfigParser CemuConfig::Save(XMLConfigParser& parser)
|
||||
// graphics
|
||||
auto graphic = config.set("Graphic");
|
||||
graphic.set("api", graphic_api);
|
||||
graphic.set("device", legacy_graphic_device_uuid);
|
||||
graphic.set("vkDevice", vk_graphic_device_uuid);
|
||||
graphic.set("mtlDevice", mtl_graphic_device_uuid);
|
||||
graphic.set("VSync", vsync);
|
||||
|
||||
@ -432,6 +432,7 @@ struct CemuConfig
|
||||
|
||||
// graphics
|
||||
ConfigValue<GraphicAPI> graphic_api{ kVulkan };
|
||||
std::array<uint8, 16> legacy_graphic_device_uuid{}; // placeholder option for backwards compatibility with settings from 2.6 and before (renamed to "vkDevice")
|
||||
std::array<uint8, 16> vk_graphic_device_uuid;
|
||||
uint64 mtl_graphic_device_uuid{ 0 };
|
||||
ConfigValue<int> vsync{ 0 }; // 0 = off, 1+ = depending on render backend
|
||||
|
||||
Loading…
Reference in New Issue
Block a user