File SDL-1.2.13-x11-keytounicode.patch of Package SDL
---
src/video/x11/SDL_x11events.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: SDL-1.2.15/src/video/x11/SDL_x11events.c
===================================================================
--- SDL-1.2.15.orig/src/video/x11/SDL_x11events.c
+++ SDL-1.2.15/src/video/x11/SDL_x11events.c
@@ -1246,8 +1246,11 @@ static void get_modifier_masks(Display *
* sequences (dead accents, compose key sequences) will not work since the
* state has been irrevocably lost.
*/
+extern DECLSPEC Uint16 SDLCALL X11_KeyToUnicode(SDLKey, SDLMod);
+
Uint16 X11_KeyToUnicode(SDLKey keysym, SDLMod modifiers)
{
+ static int warning = 1;
struct SDL_VideoDevice *this = current_video;
char keybuf[32];
int i;
@@ -1255,6 +1258,12 @@ Uint16 X11_KeyToUnicode(SDLKey keysym, S
XKeyEvent xkey;
Uint16 unicode;
+ if ( warning ) {
+ warning = 0;
+ fprintf(stderr, "WARNING: Application is using X11_KeyToUnicode().\n");
+ fprintf(stderr, "This is not an official SDL function, please report this as a bug.\n");
+ }
+
if ( !this || !SDL_Display ) {
return 0;
}