Fixed X11 character input for C locale.

Fixes #396.
This commit is contained in:
Camilla Berglund
2014-12-18 02:52:06 +01:00
parent 44372b89f6
commit b2030f6d73
4 changed files with 11 additions and 3 deletions
+4
View File
@@ -33,6 +33,7 @@
#include <string.h>
#include <limits.h>
#include <stdio.h>
#include <locale.h>
// Translate an X11 key code to a GLFW key code.
@@ -709,6 +710,9 @@ Cursor _glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
int _glfwPlatformInit(void)
{
if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0)
setlocale(LC_CTYPE, "");
XInitThreads();
_glfw.x11.display = XOpenDisplay(NULL);