浏览代码

Formatting.

Camilla Berglund 11 年之前
父节点
当前提交
2889f484f4
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/x11_window.c

+ 3 - 3
src/x11_window.c

@@ -89,10 +89,10 @@ static int translateState(int state)
 static int translateKey(int keycode)
 {
     // Use the pre-filled LUT (see updateKeyCodeLUT() in x11_init.c)
-    if ((keycode >= 0) && (keycode < 256))
-        return _glfw.x11.keyCodeLUT[keycode];
+    if (keycode < 0 || keycode > 255)
+        return GLFW_KEY_UNKNOWN;
 
-    return GLFW_KEY_UNKNOWN;
+    return _glfw.x11.keyCodeLUT[keycode];
 }
 
 // Translates an X Window event to Unicode