mirror of
https://github.com/gopher64/gopher64.git
synced 2026-11-12 17:19:00 +01:00
use key down for input
This commit is contained in:
1 parent
bb2da243b3
commit
b01c2d1885
2 files changed
+4
-5
No files matched your search
@@ -157,10 +157,8 @@ bool sdl_event_filter(void *userdata, SDL_Event *event)
|
||||
{
|
||||
wsi_platform->do_resize();
|
||||
}
|
||||
else if (event->type == SDL_EVENT_KEY_DOWN)
|
||||
else if (event->type == SDL_EVENT_KEY_DOWN && !event->key.repeat)
|
||||
{
|
||||
if (event->key.repeat)
|
||||
return 0;
|
||||
switch (event->key.scancode)
|
||||
{
|
||||
case SDL_SCANCODE_RETURN:
|
||||
|
||||
+3
-2
@@ -554,9 +554,10 @@ pub fn configure_input_profile(ui: &mut ui::Ui, profile: String, dinput: bool) {
|
||||
if event_type == u32::from(sdl3_sys::events::SDL_EVENT_WINDOW_CLOSE_REQUESTED) {
|
||||
close_controllers(open_joysticks, open_controllers);
|
||||
return;
|
||||
} else if event_type == u32::from(sdl3_sys::events::SDL_EVENT_KEY_UP) {
|
||||
} else if event_type == u32::from(sdl3_sys::events::SDL_EVENT_KEY_DOWN) {
|
||||
if unsafe {
|
||||
event.key.scancode != sdl3_sys::scancode::SDL_SCANCODE_LALT
|
||||
!event.key.repeat
|
||||
&& event.key.scancode != sdl3_sys::scancode::SDL_SCANCODE_LALT
|
||||
&& event.key.scancode != sdl3_sys::scancode::SDL_SCANCODE_RALT
|
||||
} {
|
||||
new_keys[*value] = ui::config::InputKeyButton {
|
||||
|
||||
Reference in new issue
Block a user