mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Extend glfwGetKeyboardRepeatDelay() to return both initial delay and repeat interval
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/bde9bf2e-a0dd-4ccd-8385-6a37be1e025f
This commit is contained in:
8
glfw/input.c
vendored
8
glfw/input.c
vendored
@@ -720,9 +720,11 @@ GLFWAPI bool glfwGrabKeyboard(int grab) {
|
||||
return _glfw.keyboard_grabbed;
|
||||
}
|
||||
|
||||
GLFWAPI monotonic_t glfwGetKeyboardRepeatDelay(void) {
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(ms_to_monotonic_t(500ll));
|
||||
return _glfwPlatformGetKeyboardRepeatDelay();
|
||||
GLFWAPI void glfwGetKeyboardRepeatDelay(monotonic_t *delay, monotonic_t *interval) {
|
||||
_GLFW_REQUIRE_INIT();
|
||||
if (delay) *delay = ms_to_monotonic_t(500ll);
|
||||
if (interval) *interval = ms_to_monotonic_t(30ll);
|
||||
_glfwPlatformGetKeyboardRepeatDelay(delay, interval);
|
||||
}
|
||||
|
||||
GLFWAPI int glfwGetInputMode(GLFWwindow* handle, int mode)
|
||||
|
||||
Reference in New Issue
Block a user