changed sorting of saved mappings for easier debugging

This commit is contained in:
thrust26 2020-12-17 22:47:07 +01:00
parent f59dd35f65
commit 026f64d69d
2 changed files with 7 additions and 7 deletions

View File

@ -196,9 +196,6 @@ json JoyMap::saveMapping(const EventMode mode) const
[](const MapType& a, const MapType& b)
{
// Event::Type first
if(a.second != b.second)
return a.second < b.second;
if(a.first.button != b.first.button)
return a.first.button < b.first.button;
@ -211,7 +208,10 @@ json JoyMap::saveMapping(const EventMode mode) const
if(a.first.hat != b.first.hat)
return a.first.hat < b.first.hat;
if(a.first.hdir != b.first.hdir)
return a.first.hdir < b.first.hdir;
return a.second < b.second;
}
);

View File

@ -228,13 +228,13 @@ json KeyMap::saveMapping(const EventMode mode) const
[](const MapType& a, const MapType& b)
{
// Event::Type first
if(a.second != b.second)
return a.second < b.second;
if(a.first.key != b.first.key)
return a.first.key < b.first.key;
return a.first.mod < b.first.mod;
if(a.first.mod != b.first.mod)
return a.first.mod < b.first.mod;
return a.second < b.second;
}
);