Fixed bug 1014
Don't send events for unprintable characters
This commit is contained in:
parent
b72ceb7a95
commit
528c05d5b9
1 changed files with 5 additions and 0 deletions
|
@ -764,6 +764,11 @@ SDL_SendKeyboardText(const char *text)
|
||||||
SDL_Keyboard *keyboard = &SDL_keyboard;
|
SDL_Keyboard *keyboard = &SDL_keyboard;
|
||||||
int posted;
|
int posted;
|
||||||
|
|
||||||
|
/* Don't post text events for unprintable characters */
|
||||||
|
if (*text < ' ') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Post the event, if desired */
|
/* Post the event, if desired */
|
||||||
posted = 0;
|
posted = 0;
|
||||||
if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {
|
if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue