Merge __CtrlSetAnalogX/Y into one function. Always called together.

This commit is contained in:
Henrik Rydgård
2021-07-09 10:41:26 +02:00
parent 7eaa687140
commit cd8cfcfcd7
7 changed files with 33 additions and 43 deletions
+1 -2
View File
@@ -254,8 +254,7 @@ void WebSocketInputState::AnalogSend(DebuggerRequest &req) {
if (!AnalogValue(req, &x, "x") || !AnalogValue(req, &y, "y"))
return;
__CtrlSetAnalogX(x, stick == "left" ? CTRL_STICK_LEFT : CTRL_STICK_RIGHT);
__CtrlSetAnalogY(y, stick == "left" ? CTRL_STICK_LEFT : CTRL_STICK_RIGHT);
__CtrlSetAnalogXY(stick == "left" ? CTRL_STICK_LEFT : CTRL_STICK_RIGHT, x, y);
req.Respond();
}