mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
machines: Don't override existing properties.
This commit is contained in:
parent
d0a5a1e7be
commit
5c2bd0b3bb
@ -233,11 +233,17 @@ void MachineFactory::get_device_settings(DeviceDescription& dev, map<string, str
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto& p : dev.properties) {
|
for (auto& p : dev.properties) {
|
||||||
|
if (settings.count(p.first)) {
|
||||||
|
// This is a hack. Need to implement hierarchical paths and per device properties.
|
||||||
|
LOG_F(ERROR, "Duplicate setting \"%s\".", p.first.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
settings[p.first] = p.second->get_string();
|
settings[p.first] = p.second->get_string();
|
||||||
|
|
||||||
// populate dynamic machine settings from presets
|
// populate dynamic machine settings from presets
|
||||||
gMachineSettings[p.first] = unique_ptr<BasicProperty>(p.second->clone());
|
gMachineSettings[p.first] = unique_ptr<BasicProperty>(p.second->clone());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int MachineFactory::get_machine_settings(const string& id, map<string, string> &settings)
|
int MachineFactory::get_machine_settings(const string& id, map<string, string> &settings)
|
||||||
|
Loading…
Reference in New Issue
Block a user