config: save system options

This commit is contained in:
Jakub Czekański 2021-11-13 21:47:43 +01:00
parent b4fa4476ad
commit c2ffd61c1c

View file

@ -57,6 +57,10 @@ void saveConfigFile() {
{"timeTravel", config.options.emulator.timeTravel},
};
json["options"]["system"] = {
{"ram8mb", config.options.system.ram8mb},
};
auto l = config.debug.log;
json["debug"]["log"] = {
{"bios", l.bios}, //
@ -127,6 +131,10 @@ void loadConfigFile() {
config.options.emulator.timeTravel = e["timeTravel"];
}
if (auto s = json["options"]["system"]; !s.is_null()) {
config.options.system.ram8mb = s["ram8mb"];
}
if (auto l = json["debug"]["log"]; !l.is_null()) {
config.debug.log.bios = l["bios"];
config.debug.log.cdrom = l["cdrom"];