mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-21 12:42:15 +00:00
Check for GLFW_KEY_UNKNOWN (#94)
This commit is contained in:
1 parent
f8c4a5e330
commit
7ba5867a7c
1 file changed
+3
-1
@@ -1,5 +1,7 @@
|
||||
package org.lwjglx.input;
|
||||
|
||||
import static org.lwjgl.glfw.GLFW.GLFW_KEY_UNKNOWN;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
@@ -260,7 +262,7 @@ public class Keyboard {
|
||||
return false;
|
||||
}
|
||||
final int keyCode = KeyCodes.lwjglToGlfw(key);
|
||||
return GLFW.glfwGetKey(Display.getWindow(), keyCode) == GLFW.GLFW_PRESS;
|
||||
return keyCode != GLFW_KEY_UNKNOWN && GLFW.glfwGetKey(Display.getWindow(), keyCode) == GLFW.GLFW_PRESS;
|
||||
}
|
||||
|
||||
public static void poll() {
|
||||
|
||||
Reference in new issue
Block a user