Update glfw from upstream
This commit is contained in:
parent
bfa53d4b45
commit
9ba2c4b397
1
glfw/wl_init.c
vendored
1
glfw/wl_init.c
vendored
@ -484,7 +484,6 @@ static void keyboardHandleKey(void* data,
|
||||
{
|
||||
_glfw.wl.keyRepeatInfo.glfwKeyCode = keyCode;
|
||||
_glfw.wl.keyRepeatInfo.scancode = key;
|
||||
_glfw.wl.keyRepeatInfo.isFirstRepeat = GLFW_TRUE;
|
||||
_glfw.wl.keyRepeatInfo.nextRepeatAt = glfwGetTime() + (double)(_glfw.wl.keyboardRepeatDelay) / 1000.0;
|
||||
_glfw.wl.keyRepeatInfo.keyboardFocus = window;
|
||||
}
|
||||
|
||||
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@ -208,7 +208,6 @@ typedef struct _GLFWlibraryWayland
|
||||
int plain;
|
||||
int glfwKeyCode;
|
||||
int scancode;
|
||||
GLFWbool isFirstRepeat;
|
||||
double nextRepeatAt;
|
||||
_GLFWwindow* keyboardFocus;
|
||||
} keyRepeatInfo;
|
||||
|
||||
5
glfw/wl_window.c
vendored
5
glfw/wl_window.c
vendored
@ -693,13 +693,12 @@ static void
|
||||
dispatchPendingKeyRepeats() {
|
||||
if (_glfw.wl.keyRepeatInfo.nextRepeatAt <= 0 || _glfw.wl.keyRepeatInfo.keyboardFocus != _glfw.wl.keyboardFocus || _glfw.wl.keyboardRepeatRate == 0) return;
|
||||
double now = glfwGetTime();
|
||||
const int mods = _glfw.wl.xkb.modifiers;
|
||||
while (_glfw.wl.keyRepeatInfo.nextRepeatAt <= now) {
|
||||
const int mods = _glfw.wl.xkb.modifiers;
|
||||
_glfwInputKey(_glfw.wl.keyRepeatInfo.keyboardFocus, _glfw.wl.keyRepeatInfo.glfwKeyCode, _glfw.wl.keyRepeatInfo.scancode, GLFW_REPEAT, mods);
|
||||
if (_glfw.wl.keyRepeatInfo.codepoint > -1) _glfwInputChar(_glfw.wl.keyRepeatInfo.keyboardFocus, _glfw.wl.keyRepeatInfo.codepoint, mods, _glfw.wl.keyRepeatInfo.plain);
|
||||
_glfw.wl.keyRepeatInfo.nextRepeatAt += 1.0 / _glfw.wl.keyboardRepeatRate;
|
||||
now = glfwGetTime();
|
||||
_glfw.wl.keyRepeatInfo.nextRepeatAt = now + (1.0 / _glfw.wl.keyboardRepeatRate);
|
||||
_glfw.wl.keyRepeatInfo.isFirstRepeat = GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user