Commit 474b543c authored by Mike Gorchak's avatar Mike Gorchak

Support for UTF-8 text input has been added.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404206
parent cb70cb42
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment