mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Fix minor perf problem in debug mode, navigating long game lists.
InputMappingToPspButton is very slow and was called once per item.
This commit is contained in:
1 parent
19205145e5
commit
802bae6ee8
1 file changed
+2
-2
+2
-2
@@ -158,10 +158,10 @@ public:
|
||||
std::vector<int> pspKeys;
|
||||
bool showInfo = false;
|
||||
|
||||
if (KeyMap::InputMappingToPspButton(InputMapping(key.deviceId, key.keyCode), &pspKeys)) {
|
||||
if (HasFocus() && KeyMap::InputMappingToPspButton(InputMapping(key.deviceId, key.keyCode), &pspKeys)) {
|
||||
for (auto it = pspKeys.begin(), end = pspKeys.end(); it != end; ++it) {
|
||||
// If the button mapped to triangle, then show the info.
|
||||
if (HasFocus() && (key.flags & KEY_UP) && *it == CTRL_TRIANGLE) {
|
||||
if ((key.flags & KEY_UP) && *it == CTRL_TRIANGLE) {
|
||||
showInfo = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user