mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-18 08:50:29 +02:00
Don't have pauseTrigger as an output parameter from ControlMapper::Key()
This commit is contained in:
1 parent
d98354aaa1
commit
02aaa3b2b9
6 files changed
+30
-20
No files matched your search
+10
-6
@@ -1189,7 +1189,7 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
if (mappingFound) {
|
||||
for (auto b : pspButtons) {
|
||||
if (b == VIRTKEY_TOGGLE_DEBUGGER || b == VIRTKEY_PAUSE) {
|
||||
return g_controlMapper.Key(key, &pauseTrigger_);
|
||||
return g_controlMapper.Key(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1199,28 +1199,28 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
switch (key.deviceId) {
|
||||
case DEVICE_ID_KEYBOARD:
|
||||
if (!ImGui::GetIO().WantCaptureKeyboard) {
|
||||
g_controlMapper.Key(key, &pauseTrigger_);
|
||||
g_controlMapper.Key(key);
|
||||
}
|
||||
break;
|
||||
case DEVICE_ID_MOUSE:
|
||||
if (!ImGui::GetIO().WantCaptureMouse) {
|
||||
g_controlMapper.Key(key, &pauseTrigger_);
|
||||
g_controlMapper.Key(key);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_controlMapper.Key(key, &pauseTrigger_);
|
||||
g_controlMapper.Key(key);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Let up-events through to the controlMapper_ so input doesn't get stuck.
|
||||
if (key.flags & KeyInputFlags::UP) {
|
||||
g_controlMapper.Key(key, &pauseTrigger_);
|
||||
g_controlMapper.Key(key);
|
||||
}
|
||||
}
|
||||
|
||||
return UIScreen::UnsyncKey(key);
|
||||
}
|
||||
return g_controlMapper.Key(key, &pauseTrigger_);
|
||||
return g_controlMapper.Key(key);
|
||||
}
|
||||
|
||||
void EmuScreen::UnsyncAxis(const AxisInput *axes, size_t count) {
|
||||
@@ -1525,6 +1525,10 @@ void EmuScreen::update() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_controlMapper.PollPauseTrigger()) {
|
||||
pauseTrigger_ = true;
|
||||
}
|
||||
|
||||
if (pauseTrigger_) {
|
||||
pauseTrigger_ = false;
|
||||
screenManager()->push(new GamePauseScreen(gamePath_, bootPending_));
|
||||
|
||||
Reference in new issue
Block a user