1
0
Fork 0
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:
siavash 2013-07-15 18:28:09 +02:00 committed by Camilla Berglund
parent f1397843ee
commit b12c973922
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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;
} }