mirror of
https://github.com/yawut/SDL.git
synced 2026-08-23 09:15:18 -05:00
Fixed bug 1014
Don't send events for unprintable characters
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user