mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 04:00:00 +00:00
Attempt to fix input delays on GLFW
This commit is contained in:
parent
ab939e059b
commit
a216bb56ee
|
@ -1448,7 +1448,7 @@ bool rshiftStatus = false;
|
||||||
void
|
void
|
||||||
keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods)
|
keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||||
{
|
{
|
||||||
if (key >= 0 && key <= GLFW_KEY_LAST) {
|
if (key >= 0 && key <= GLFW_KEY_LAST && action != GLFW_REPEAT) {
|
||||||
RsKeyCodes ks = (RsKeyCodes)keymap[key];
|
RsKeyCodes ks = (RsKeyCodes)keymap[key];
|
||||||
|
|
||||||
if (key == GLFW_KEY_LEFT_SHIFT)
|
if (key == GLFW_KEY_LEFT_SHIFT)
|
||||||
|
@ -1459,7 +1459,6 @@ keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||||
|
|
||||||
if (action == GLFW_RELEASE) RsKeyboardEventHandler(rsKEYUP, &ks);
|
if (action == GLFW_RELEASE) RsKeyboardEventHandler(rsKEYUP, &ks);
|
||||||
else if (action == GLFW_PRESS) RsKeyboardEventHandler(rsKEYDOWN, &ks);
|
else if (action == GLFW_PRESS) RsKeyboardEventHandler(rsKEYDOWN, &ks);
|
||||||
else if (action == GLFW_REPEAT) RsKeyboardEventHandler(rsKEYDOWN, &ks);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue