mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-27 04:28:52 -05:00
Moved X11 character translation failure test.
This commit is contained in:
parent
f1397843ee
commit
b12c973922
|
@ -154,9 +154,6 @@ void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int m
|
||||||
|
|
||||||
void _glfwInputChar(_GLFWwindow* window, unsigned int character)
|
void _glfwInputChar(_GLFWwindow* window, unsigned int character)
|
||||||
{
|
{
|
||||||
if (character == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (character < 32 || (character > 126 && character < 160))
|
if (character < 32 || (character > 126 && character < 160))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -520,7 +520,11 @@ static void processEvent(XEvent *event)
|
||||||
_glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods);
|
_glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods);
|
||||||
|
|
||||||
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
|
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
|
||||||
_glfwInputChar(window, translateChar(&event->xkey));
|
{
|
||||||
|
const int character = translateChar(&event->xkey);
|
||||||
|
if (character != -1)
|
||||||
|
_glfwInputChar(window, character);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user