1
0
Fork 0

Migrate invert-mouse-wheel setting from pre 2019.x

Flip the sense of this property, since the interpretation in SG is
also flipped now.
This commit is contained in:
James Turner 2019-04-11 20:40:17 +01:00
parent 4d562e2a90
commit 4e8e69b4f8

View file

@ -764,6 +764,14 @@ static void tryAutosaveMigration(const SGPath& userDataPath, SGPropertyNode* pro
// apply migration filters for each property in turn
deleteProperties(&oldProps, blacklist);
// manual migrations
// migrate pre-2019.1 sense of /sim/mouse/invert-mouse-wheel
if (foundVersion.first < 2019) {
SGPropertyNode_ptr wheelNode = oldProps.getNode("/sim/mouse/invert-mouse-wheel");
if (wheelNode) {
wheelNode->setBoolValue(!wheelNode->getBoolValue());
}
}
// copy remaining props out
copyProperties(&oldProps, props);