|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
Namespace encapsulating all input polling and gamepad management. More...
Functions | |
| InputSnapshot | pollCurrentState () |
| Build a snapshot of the current state of all input devices. | |
| std::set< SDL_Keycode > | pollKeyboardState () |
| Return the set of keyboard keys that are currently held down. | |
| void | detectController () |
| Detect and open the first available gamepad. | |
| void | updateInputSource (const IWindow &window) |
| Update isControllerActive based on recent device activity. | |
| void | rumble (float lowFrequencyStrength, float highFrequencyStrength, Uint32 durationMs) |
| Trigger a rumble effect on the active gamepad. | |
| void | resetKeyboardState () |
| Reset SDL's internal keyboard state, clearing any stuck keys. | |
| void | shutdown () |
| Shut down the input system and release all resources. | |
| void | requestKeyboardRestore () |
| Schedule a one-shot keyboard state restore. | |
| bool | consumeKeyboardRestoreRequest () |
| Consume and return any pending keyboard-restore request. | |
Variables | |
| bool | isControllerActive |
| True when the most recently active input source was a gamepad. | |
| SDL_Gamepad * | g_gamepad |
| Handle to the currently open gamepad, or nullptr if none is connected. | |
Namespace encapsulating all input polling and gamepad management.
Call detectController() once at startup and updateInputSource() each frame to keep isControllerActive in sync with recent hardware activity.