mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-10 18:31:33 -06:00
Fix config saving
This commit is contained in:
parent
567785056b
commit
961935664d
@ -216,9 +216,9 @@ namespace CameraManager
|
||||
void SaveDevice()
|
||||
{
|
||||
std::scoped_lock lock(s_mutex);
|
||||
auto& config = GetConfig();
|
||||
const auto cameraId = s_device ? Cap_getDeviceUniqueID(s_ctx, *s_device) : "";
|
||||
config.camera_id = cameraId;
|
||||
const std::string cameraId = s_device ? Cap_getDeviceUniqueID(s_ctx, *s_device) : "";
|
||||
GetConfig().camera_id.SetValue(cameraId);
|
||||
GetConfigHandle().Save();
|
||||
}
|
||||
|
||||
std::optional<uint32> GetCurrentDevice()
|
||||
|
||||
@ -291,7 +291,7 @@ XMLConfigParser CemuConfig::Load(XMLConfigParser& parser)
|
||||
emulated_usb_devices.emulate_dimensions_toypad = usbdevices.get("EmulateDimensionsToypad", emulated_usb_devices.emulate_dimensions_toypad);
|
||||
|
||||
|
||||
auto camera = parser.get("camera");
|
||||
auto camera = parser.get("Camera");
|
||||
camera_id = camera.get("DeviceId", "");
|
||||
|
||||
return parser;
|
||||
@ -457,6 +457,9 @@ XMLConfigParser CemuConfig::Save(XMLConfigParser& parser)
|
||||
usbdevices.set("EmulateInfinityBase", emulated_usb_devices.emulate_infinity_base.GetValue());
|
||||
usbdevices.set("EmulateDimensionsToypad", emulated_usb_devices.emulate_dimensions_toypad.GetValue());
|
||||
|
||||
auto camera = config.set("Camera");
|
||||
camera.set("DeviceId", camera_id.GetValue());
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user