mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-01-17 20:58:28 +01:00
5dbaec85a7
byuu says: Changelog: - processor/upd96050: always potentially update S1 on ALU ops, sans NOP - theory by Lord Nightmare. I'm impartial on this one, but may as well match his design - sfc: fixed save state hang [reported by FitzRoy; fixed by Cydrak] - icarus: do not save settings.bml file when in library mode
25 lines
689 B
C++
25 lines
689 B
C++
struct Settings : Markup::Node {
|
|
Settings();
|
|
auto save() -> void;
|
|
};
|
|
|
|
Settings::Settings() {
|
|
Markup::Node::operator=(BML::unserialize(string::read(locate("settings.bml"))));
|
|
|
|
auto set = [&](const string& name, const string& value) {
|
|
//create node and set to default value only if it does not already exist
|
|
if(!operator[](name)) operator()(name).setValue(value);
|
|
};
|
|
|
|
set("Library/Location", {Path::user(), "Emulation/"});
|
|
|
|
set("icarus/Path", Path::user());
|
|
set("icarus/CreateManifests", false);
|
|
set("icarus/UseDatabase", true);
|
|
set("icarus/UseHeuristics", true);
|
|
}
|
|
|
|
auto Settings::save() -> void {
|
|
file::write(locate("settings.bml"), BML::serialize(*this));
|
|
}
|