feat(gamepad): detecció i notificacions hot-plug amb GamepadManager

This commit is contained in:
JailDesigner committed 2026-04-22 19:39:16 +02:00
1 parent be9309d342
commit 7c35ffaa74
9 files changed
+305 -15

No files matched your search

+8
View File
@@ -28,4 +28,12 @@ namespace InputState {
return blocked ? zeroKeyboard() : SDL_GetKeyboardState(nullptr);
}
auto getGamepadButton(SDL_Gamepad* gp, SDL_GamepadButton b) -> bool {
return (blocked || gp == nullptr) ? false : SDL_GetGamepadButton(gp, b);
}
auto getGamepadAxis(SDL_Gamepad* gp, SDL_GamepadAxis ax) -> Sint16 {
return (blocked || gp == nullptr) ? static_cast<Sint16>(0) : SDL_GetGamepadAxis(gp, ax);
}
} // namespace InputState