Clean up __Ctrl button functions.

This commit is contained in:
Henrik Rydgård
2023-04-01 08:55:45 +02:00
parent 2428051f17
commit 04d3d3111c
7 changed files with 25 additions and 54 deletions
+3 -8
View File
@@ -155,12 +155,7 @@ void WebSocketInputState::ButtonsSend(DebuggerRequest &req) {
}
}
if (downFlags) {
__CtrlButtonDown(downFlags);
}
if (upFlags) {
__CtrlButtonUp(upFlags);
}
__CtrlUpdateButtons(downFlags, upFlags);
req.Respond();
}
@@ -193,7 +188,7 @@ void WebSocketInputState::ButtonsPress(DebuggerRequest &req) {
press.button = info->second;
// TODO: Route into the control mapper's PSPKey function instead.
__CtrlButtonDown(press.button);
__CtrlUpdateButtons(press.button, 0);
pressTickets_.push_back(press);
}
@@ -207,7 +202,7 @@ void WebSocketInputState::Broadcast(net::WebSocketServer *ws) {
press.duration--;
if (press.duration == -1) {
// TODO: Route into the control mapper's PSPKey function instead.
__CtrlButtonUp(press.button);
__CtrlUpdateButtons(0, press.button);
ws->Send(press.Event());
}
}