mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Fix XIM input on non-UTF-8 locales
This commit is contained in:
+3
-1
@@ -709,10 +709,12 @@ Cursor _glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
|
||||
|
||||
int _glfwPlatformInit(void)
|
||||
{
|
||||
#if !defined(X_HAVE_UTF8_STRING)
|
||||
// HACK: If the current locale is C, apply the environment's locale
|
||||
// This is done because the C locale breaks character input
|
||||
// This is done because the C locale breaks wide character input
|
||||
if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0)
|
||||
setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
|
||||
XInitThreads();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user