mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 19:55:27 +02:00
ImDebugger: Send inputs to the game when no windows are focused (click the background)
This commit is contained in:
+18
-10
@@ -1023,10 +1023,18 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
// Enable gamepad controls while running imgui (but ignore mouse/keyboard).
|
||||
switch (key.deviceId) {
|
||||
case DEVICE_ID_KEYBOARD:
|
||||
if (!ImGui::GetIO().WantCaptureKeyboard) {
|
||||
controlMapper_.Key(key, &pauseTrigger_);
|
||||
}
|
||||
break;
|
||||
case DEVICE_ID_MOUSE:
|
||||
if (!ImGui::GetIO().WantCaptureMouse) {
|
||||
controlMapper_.Key(key, &pauseTrigger_);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
controlMapper_.Key(key, &pauseTrigger_);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1035,6 +1043,16 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
return controlMapper_.Key(key, &pauseTrigger_);
|
||||
}
|
||||
|
||||
void EmuScreen::UnsyncAxis(const AxisInput *axes, size_t count) {
|
||||
System_Notify(SystemNotification::ACTIVITY);
|
||||
|
||||
if (UI::IsFocusMovementEnabled()) {
|
||||
return UIScreen::UnsyncAxis(axes, count);
|
||||
}
|
||||
|
||||
return controlMapper_.Axis(axes, count);
|
||||
}
|
||||
|
||||
bool EmuScreen::key(const KeyInput &key) {
|
||||
bool retval = UIScreen::key(key);
|
||||
|
||||
@@ -1062,16 +1080,6 @@ void EmuScreen::touch(const TouchInput &touch) {
|
||||
}
|
||||
}
|
||||
|
||||
void EmuScreen::UnsyncAxis(const AxisInput *axes, size_t count) {
|
||||
System_Notify(SystemNotification::ACTIVITY);
|
||||
|
||||
if (UI::IsFocusMovementEnabled()) {
|
||||
return UIScreen::UnsyncAxis(axes, count);
|
||||
}
|
||||
|
||||
return controlMapper_.Axis(axes, count);
|
||||
}
|
||||
|
||||
class GameInfoBGView : public UI::InertView {
|
||||
public:
|
||||
GameInfoBGView(const Path &gamePath, UI::LayoutParams *layoutParams) : InertView(layoutParams), gamePath_(gamePath) {}
|
||||
|
||||
Reference in New Issue
Block a user