Last active
August 26, 2015 10:12
-
-
Save ageldama/6c713311c6cadd7bb607 to your computer and use it in GitHub Desktop.
hg diff src/video/x11/SDL_x11video.c src/video/x11/SDL_x11sym.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r dba168c67bea src/video/x11/SDL_x11video.c | |
--- a/src/video/x11/SDL_x11video.c Fri Aug 21 23:50:59 2015 +0200 | |
+++ b/src/video/x11/SDL_x11video.c Wed Aug 26 18:53:04 2015 +0900 | |
@@ -39,6 +39,10 @@ | |
#include "SDL_x11opengles.h" | |
#endif | |
+#ifdef X_HAVE_UTF8_STRING | |
+#include <locale.h> | |
+#endif | |
+ | |
/* Initialization/Query functions */ | |
static int X11_VideoInit(_THIS); | |
static void X11_VideoQuit(_THIS); | |
@@ -175,6 +179,15 @@ | |
} | |
device->driverdata = data; | |
+#ifdef X_HAVE_UTF8_STRING | |
+ if (SDL_X11_HAVE_UTF8) { | |
+ setlocale(LC_ALL, ""); | |
+ if (NULL == X11_XSetLocaleModifiers("")) { | |
+ return NULL; | |
+ } | |
+ } | |
+#endif | |
+ | |
/* FIXME: Do we need this? | |
if ( (SDL_strncmp(X11_XDisplayName(display), ":", 1) == 0) || | |
(SDL_strncmp(X11_XDisplayName(display), "unix:", 5) == 0) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r dba168c67bea src/video/x11/SDL_x11sym.h | |
--- a/src/video/x11/SDL_x11sym.h Fri Aug 21 23:50:59 2015 +0200 | |
+++ b/src/video/x11/SDL_x11sym.h Wed Aug 26 19:11:23 2015 +0900 | |
@@ -187,6 +187,7 @@ | |
SDL_X11_SYM(Status,XCloseIM,(XIM a),(a),return) | |
SDL_X11_SYM(void,Xutf8DrawString,(Display *a, Drawable b, XFontSet c, GC d, int e, int f, _Xconst char *g, int h),(a,b,c,d,e,f,g,h),) | |
SDL_X11_SYM(int,Xutf8TextExtents,(XFontSet a, _Xconst char* b, int c, XRectangle* d, XRectangle* e),(a,b,c,d,e),return) | |
+SDL_X11_SYM(char *,XSetLocaleModifiers,(char *a),(a),return) | |
#endif | |
#ifndef NO_SHARED_MEMORY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment