瀏覽代碼

Use SDL_iscntrl() call instead of manual code that is doing the same (#8593)

Dimitriy Ryazantcev 2 年之前
父節點
當前提交
0413f6fc49
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/events/SDL_keyboard.c

+ 1 - 1
src/events/SDL_keyboard.c

@@ -1063,7 +1063,7 @@ int SDL_SendKeyboardText(const char *text)
     int posted;
     int posted;
 
 
     /* Don't post text events for unprintable characters */
     /* Don't post text events for unprintable characters */
-    if ((unsigned char)*text < ' ' || *text == 127) {
+    if (SDL_iscntrl((int)*text)) {
         return 0;
         return 0;
     }
     }