Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403823
This commit is contained in:
Sam Lantinga 2009-09-19 13:29:40 +00:00
parent c03508fe86
commit d4f133c2bf
17 changed files with 605 additions and 14 deletions

View file

@ -40,6 +40,7 @@ static SDL_GLContext *SDL_VideoContext = NULL;
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 @@ SDL_GetKeyRepeat(int *delay, int *interval)
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: */