mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
UI: Flip Y analog direction based on config.
This commit is contained in:
1 parent
c9428975fe
commit
eca3a405b6
6 files changed
+72
-30
No files matched your search
@@ -33,6 +33,7 @@ std::vector<KeyDef> confirmKeys;
|
||||
std::vector<KeyDef> cancelKeys;
|
||||
std::vector<KeyDef> tabLeftKeys;
|
||||
std::vector<KeyDef> tabRightKeys;
|
||||
static std::unordered_map<int, int> uiFlipAnalogY;
|
||||
|
||||
static void AppendKeys(std::vector<KeyDef> &keys, const std::vector<KeyDef> &newKeys) {
|
||||
for (auto iter = newKeys.begin(); iter != newKeys.end(); ++iter) {
|
||||
@@ -61,3 +62,14 @@ void SetTabLeftRightKeys(const std::vector<KeyDef> &tabLeft, const std::vector<K
|
||||
tabLeftKeys = tabLeft;
|
||||
tabRightKeys = tabRight;
|
||||
}
|
||||
|
||||
void SetAnalogFlipY(std::unordered_map<int, int> flipYByDeviceId) {
|
||||
uiFlipAnalogY = flipYByDeviceId;
|
||||
}
|
||||
|
||||
int GetAnalogYDirection(int deviceId) {
|
||||
auto configured = uiFlipAnalogY.find(deviceId);
|
||||
if (configured != uiFlipAnalogY.end())
|
||||
return configured->second;
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user