diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-29 11:31:08 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-29 11:31:08 +0100 |
| commit | f9950fce6f7b7a3743920f0d787fb1857aa05769 (patch) | |
| tree | 96ee578fcbc11f30026f36cd19215cebf0afb081 /src/input.c | |
| parent | 668594a0bedec468e976a38bbf9eac871e1353de (diff) | |
Implement Cart Shutdown
Diffstat (limited to 'src/input.c')
| -rw-r--r-- | src/input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c index 5e0ee27..eec088e 100644 --- a/src/input.c +++ b/src/input.c @@ -36,6 +36,10 @@ void pw_input_free(struct pw_input *input) { SDL_free(input); } +static void clear_queue(struct pw_keyboard_queue *queue) { + queue->start = queue->end = 0; +} + bool pw_input_reset(struct pw_input *input, struct pw_players *players) { if (!input) { return SDL_InvalidParamError("input"); @@ -48,6 +52,9 @@ bool pw_input_reset(struct pw_input *input, struct pw_players *players) { input->nplayers = pw_players_status(players, connected); SDL_zeroa(input->players); + clear_queue(&input->keyboard.scancodes); + clear_queue(&input->keyboard.scancodes); + return true; } |
