prevent key repeat clogging just_pressed

This commit is contained in:
Theis Pieter Hollebeek 2025-03-03 22:45:04 +01:00
parent 45ae4223ab
commit 9a978c3b3d

View File

@ -371,6 +371,7 @@ pub fn start_game() -> Result<(), String> {
}
Event::KeyDown {
keycode: Some(keycode),
repeat: false,
..
} => {
let Some(key) = Key::from_sdl_keycode(keycode) else {
@ -409,6 +410,7 @@ pub fn start_game() -> Result<(), String> {
}
Event::KeyUp {
keycode: Some(keycode),
repeat: false,
..
} => {
let Some(key) = Key::from_sdl_keycode(keycode) else {