Align input policy startup flow and fix gamepad reconnect handling
Some checks are pending
Build / setup (push) Waiting to run
Build / build-appimage (push) Blocked by required conditions
Build / build-steamlink (push) Blocked by required conditions
Build / build-windows-macos (push) Blocked by required conditions

This commit is contained in:
Joey Yakimowich-Payne 2026-02-12 01:36:36 -07:00
commit e88be5dce2
4 changed files with 65 additions and 4 deletions

View file

@ -307,6 +307,41 @@ void SdlInputHandler::raiseAllMouseButtons()
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_X2);
}
void SdlInputHandler::raiseAllGamepadInputs()
{
uint16_t raisedIndexMask = 0;
for (auto &state : m_GamepadState) {
if (state.controller == nullptr) {
continue;
}
state.buttons = 0;
state.lt = 0;
state.rt = 0;
state.lsX = 0;
state.lsY = 0;
state.rsX = 0;
state.rsY = 0;
state.emulatedClickpadButtonDown = false;
if ((raisedIndexMask & (1 << state.index)) != 0) {
continue;
}
LiSendMultiControllerEvent(state.index,
m_GamepadMask,
0,
0,
0,
0,
0,
0,
0);
raisedIndexMask |= (1 << state.index);
}
}
void SdlInputHandler::notifyMouseLeave()
{
// SDL on Windows doesn't send the mouse button up until the mouse re-enters the window