From c49475960688506557a7ce7307b60f074f332b2e Mon Sep 17 00:00:00 2001 From: Tarmack Date: Tue, 9 Oct 2018 13:28:30 +0200 Subject: [PATCH] Divide a second over the key repeat Hz value for the timer value --- glfw/wl_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/wl_init.c b/glfw/wl_init.c index b622b0bf9..ca3904e9f 100644 --- a/glfw/wl_init.c +++ b/glfw/wl_init.c @@ -407,7 +407,7 @@ static void dispatchPendingKeyRepeats(id_type timer_id, void *data) { if (_glfw.wl.keyRepeatInfo.keyboardFocus != _glfw.wl.keyboardFocus || _glfw.wl.keyboardRepeatRate == 0) return; glfw_xkb_handle_key_event(_glfw.wl.keyRepeatInfo.keyboardFocus, &_glfw.wl.xkb, _glfw.wl.keyRepeatInfo.key, GLFW_REPEAT); - changeTimerInterval(&_glfw.wl.eventLoopData, _glfw.wl.keyRepeatInfo.keyRepeatTimer, ((double)_glfw.wl.keyboardRepeatRate) / 1000.0); + changeTimerInterval(&_glfw.wl.eventLoopData, _glfw.wl.keyRepeatInfo.keyRepeatTimer, (1.0 / (double)_glfw.wl.keyboardRepeatRate)); toggleTimer(&_glfw.wl.eventLoopData, _glfw.wl.keyRepeatInfo.keyRepeatTimer, 1); }