Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Support for UTF-8 text input has been added.
Browse files Browse the repository at this point in the history
  • Loading branch information
llmike committed Nov 20, 2009
1 parent 6c782d9 commit 359d957
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/video/photon/SDL_photon.c
Expand Up @@ -2685,6 +2685,23 @@ photon_pumpevents(_THIS)
SDL_SendKeyboardKey(0, SDL_RELEASED,
scancode);
}

}

/* Handle UTF-8 text input if requested by caller */
if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY))
{
char text[5];

SDL_memset(text, 0x00, 5);
if (PhKeyToMb(text, keyevent)!=-1)
{
SDL_SendKeyboardText(0, text);
}
else
{
/* Just do nothing if it is not a UTF-8 character */
}
}
}
break;
Expand Down

0 comments on commit 359d957

Please sign in to comment.