feat(gamepad): detecció i notificacions hot-plug amb GamepadManager
This commit is contained in:
1 parent
be9309d342
commit
7c35ffaa74
9 files changed
+305
-15
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user