mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Debugger: Include all press states for convenience.
In case of a multi-button shortcut, which might be common for debugging.
This commit is contained in:
1 parent
f97df5d153
commit
1148e6e4ba
1 file changed
+7
-1
@@ -26,8 +26,9 @@
|
||||
//
|
||||
// Sent unexpectedly with these properties:
|
||||
// - buttons: an object with button names as keys and bool press state as values.
|
||||
// - changed: same as buttons, but only including changed states.
|
||||
//
|
||||
// See input.buttons.send in InputSubscriber for button names. Only changed buttons are sent.
|
||||
// See input.buttons.send in InputSubscriber for button names.
|
||||
|
||||
// Analog position change (input.analog)
|
||||
//
|
||||
@@ -55,6 +56,11 @@ static std::string ButtonsEvent(uint32_t lastButtons, uint32_t newButtons) {
|
||||
j.begin();
|
||||
j.writeString("event", "input.buttons");
|
||||
j.pushDict("buttons");
|
||||
for (auto it : WebSocketInputButtonLookup()) {
|
||||
j.writeBool(it.first, (newButtons & it.second) != 0);
|
||||
}
|
||||
j.pop();
|
||||
j.pushDict("changed");
|
||||
for (auto it : WebSocketInputButtonLookup()) {
|
||||
if (pressed & it.second) {
|
||||
j.writeBool(it.first, true);
|
||||
|
||||
Reference in new issue
Block a user