--- a/src/SDL_compat.c Sat Sep 19 12:48:52 2009 +0000
+++ b/src/SDL_compat.c Sat Sep 19 13:29:40 2009 +0000
@@ -40,6 +40,7 @@
static Uint32 SDL_VideoFlags = 0;
static char *wm_title = NULL;
static SDL_Surface *SDL_VideoIcon;
+static int SDL_enabled_UNICODE = 0;
char *
SDL_AudioDriverName(char *namebuf, int maxlen)
@@ -1720,7 +1721,19 @@
int
SDL_EnableUNICODE(int enable)
{
- return SDL_EventState(SDL_TEXTINPUT, enable);
+ int previous = SDL_enabled_UNICODE;
+
+ switch (enable) {
+ case 1:
+ SDL_enabled_UNICODE = 1;
+ SDL_StartTextInput();
+ break;
+ case 0:
+ SDL_enabled_UNICODE = 0;
+ SDL_StopTextInput();
+ break;
+ }
+ return previous;
}
/* vi: set ts=4 sw=4 expandtab: */