Fixed bug 1014

Don't send events for unprintable characters
This commit is contained in:
Sam Lantinga
2010-07-17 18:57:51 -07:00
parent e880b725c0
commit 6920164fad

View File

@@ -764,6 +764,11 @@ SDL_SendKeyboardText(const char *text)
SDL_Keyboard *keyboard = &SDL_keyboard;
int posted;
/* Don't post text events for unprintable characters */
if (*text < ' ') {
return 0;
}
/* Post the event, if desired */
posted = 0;
if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {