mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-09 06:03:35 +02:00
[UI/Windows] Object out of scope optimization for better codegeneration (lower level scope)
This commit is contained in:
@@ -403,12 +403,12 @@ bool KeyMappingNewMouseKeyDialog::key(const KeyInput &key) {
|
||||
|
||||
mapped_ = true;
|
||||
|
||||
MultiInputMapping kdf(InputMapping(key.deviceId, key.keyCode));
|
||||
|
||||
TriggerFinish(DR_YES);
|
||||
g_Config.bMapMouse = false;
|
||||
if (callback_)
|
||||
if (callback_) {
|
||||
MultiInputMapping kdf(InputMapping(key.deviceId, key.keyCode));
|
||||
callback_(kdf);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -455,18 +455,20 @@ void KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
|
||||
|
||||
if (axis.value > AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
MultiInputMapping kdf(InputMapping(axis.deviceId, axis.axisId, 1));
|
||||
TriggerFinish(DR_YES);
|
||||
if (callback_)
|
||||
if (callback_) {
|
||||
MultiInputMapping kdf(InputMapping(axis.deviceId, axis.axisId, 1));
|
||||
callback_(kdf);
|
||||
}
|
||||
}
|
||||
|
||||
if (axis.value < -AXIS_BIND_THRESHOLD) {
|
||||
mapped_ = true;
|
||||
MultiInputMapping kdf(InputMapping(axis.deviceId, axis.axisId, -1));
|
||||
TriggerFinish(DR_YES);
|
||||
if (callback_)
|
||||
if (callback_) {
|
||||
MultiInputMapping kdf(InputMapping(axis.deviceId, axis.axisId, -1));
|
||||
callback_(kdf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user