fix(cpn): missing sources when reading models and settings (#7089)
This commit is contained in:
@@ -638,8 +638,11 @@ bool convert<GeneralSettings>::decode(const Node& node, GeneralSettings& rhs)
|
|||||||
// the GeneralSettings struct is initialised to hardware definition defaults which is fine for new settings
|
// the GeneralSettings struct is initialised to hardware definition defaults which is fine for new settings
|
||||||
// however when parsing saved settings set all inputs to None and override with parsed values
|
// however when parsing saved settings set all inputs to None and override with parsed values
|
||||||
// thus any inputs not parsed will be None rather than the default
|
// thus any inputs not parsed will be None rather than the default
|
||||||
|
// exceptions:
|
||||||
|
// preserve those hardware defaults never written to yaml
|
||||||
for (int i = 0; i < CPN_MAX_INPUTS; i++) {
|
for (int i = 0; i < CPN_MAX_INPUTS; i++) {
|
||||||
rhs.inputConfig[i].flexType = (Board::FlexType)Board::FLEX_NONE;
|
if (Boards::isInputConfigurable(i))
|
||||||
|
rhs.inputConfig[i].flexType = (Board::FlexType)Board::FLEX_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node["sticksConfig"]) {
|
if (node["sticksConfig"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user