mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-26 19:40:23 +00:00
wayland: Pass the keyboard ID through to repeat events
This commit is contained in:
parent
0df0462d0a
commit
9e460ce6a6
@ -286,13 +286,14 @@ static void keyboard_repeat_clear(SDL_WaylandKeyboardRepeat *repeat_info)
|
||||
repeat_info->is_key_down = SDL_FALSE;
|
||||
}
|
||||
|
||||
static void keyboard_repeat_set(SDL_WaylandKeyboardRepeat *repeat_info, uint32_t key, Uint64 wl_press_time_ns,
|
||||
static void keyboard_repeat_set(SDL_WaylandKeyboardRepeat *repeat_info, Uint32 keyboard_id, uint32_t key, Uint64 wl_press_time_ns,
|
||||
uint32_t scancode, SDL_bool has_text, char text[8])
|
||||
{
|
||||
if (!repeat_info->is_initialized || !repeat_info->repeat_rate) {
|
||||
return;
|
||||
}
|
||||
repeat_info->is_key_down = SDL_TRUE;
|
||||
repeat_info->keyboard_id = keyboard_id;
|
||||
repeat_info->key = key;
|
||||
repeat_info->wl_press_time_ns = wl_press_time_ns;
|
||||
repeat_info->sdl_press_time_ns = SDL_GetTicksNS();
|
||||
@ -1631,7 +1632,7 @@ static void keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
|
||||
}
|
||||
}
|
||||
if (input->xkb.keymap && WAYLAND_xkb_keymap_key_repeats(input->xkb.keymap, key + 8)) {
|
||||
keyboard_repeat_set(&input->keyboard_repeat, key, timestamp_raw_ns, scancode, has_text, text);
|
||||
keyboard_repeat_set(&input->keyboard_repeat, input->keyboard_id, key, timestamp_raw_ns, scancode, has_text, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user