Use [Unknown]'s suggested method instead.

This commit is contained in:
The Dax 2014-01-31 00:54:38 -05:00
parent 910abacb3f
commit 73f61d908c

View file

@ -97,16 +97,16 @@ public:
std::vector<int> pspKeys;
bool showInfo = false;
if (HasFocus() && (key.flags & KEY_UP) && KeyMap::KeyToPspButton(key.deviceId, key.keyCode, &pspKeys)) {
if (KeyMap::KeyToPspButton(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 (*it == CTRL_TRIANGLE) {
if (HasFocus() && (key.flags & KEY_UP) && *it == CTRL_TRIANGLE) {
showInfo = true;
}
}
} else if (hovering_ && key.deviceId == DEVICE_ID_MOUSE && key.keyCode == NKCODE_EXT_MOUSEBUTTON_2) {
// If it's the right mouse button, and it's not otherwise mapped, show the info also.
if (HasFocus() && (key.flags & KEY_UP)) {
if (key.flags & KEY_UP) {
showInfo = true;
}
}