OSDN Git Service

Fixed JGLFW command key on Mac.
authorNathanSweet <nathan.sweet@gmail.com>
Wed, 5 Jun 2013 16:47:46 +0000 (18:47 +0200)
committerNathanSweet <nathan.sweet@gmail.com>
Wed, 5 Jun 2013 16:47:46 +0000 (18:47 +0200)
I had broke it because I break the things.

backends/gdx-backend-jglfw/src/com/badlogic/gdx/backends/jglfw/JglfwInput.java

index 24ccabd..ddb80f2 100644 (file)
@@ -175,10 +175,8 @@ public class JglfwInput implements Input {
 
        public boolean isKeyPressed (int key) {
                if (key == Input.Keys.ANY_KEY) return pressedKeys > 0;
-               if (key == Input.Keys.SYM) {
-                       return glfwGetKey(app.graphics.window, getJglfwKeyCode(GLFW_KEY_LEFT_SUPER))
-                               || glfwGetKey(app.graphics.window, getJglfwKeyCode(GLFW_KEY_RIGHT_SUPER));
-               }
+               if (key == Input.Keys.SYM)
+                       return glfwGetKey(app.graphics.window, GLFW_KEY_LEFT_SUPER) || glfwGetKey(app.graphics.window, GLFW_KEY_RIGHT_SUPER);
                return glfwGetKey(app.graphics.window, getJglfwKeyCode(key));
        }