Layout converter v1 -> unfinished v2

"i want new keyboard for pojavluancher" x20 by @𝙵𝚊𝚔ȇ̈_A𝕣ᴄᴀᴅᴇ#7200
This commit is contained in:
Duy Tran Khanh committed 2021-08-07 10:17:52 +07:00
1 parent e079e86a80
commit 66bee901db
5 files changed
+111 -53

No files matched your search

@@ -483,7 +483,7 @@ public class GLFW
/* volatile */ public static GLFWWindowPosCallback mGLFWWindowPosCallback;
/* volatile */ public static GLFWWindowRefreshCallback mGLFWWindowRefreshCallback;
/* volatile */ public static GLFWWindowSizeCallback mGLFWWindowSizeCallback;
volatile public static int mGLFWWindowWidth, mGLFWWindowHeight;
volatile public static double mGLFWCursorX, mGLFWCursorY, mGLFWCursorLastX, mGLFWCursorLastY;
@@ -497,7 +497,7 @@ public class GLFW
private static ArrayMap<Long, GLFWWindowProperties> mGLFWWindowMap;
public static boolean mGLFWIsGrabbing, mGLFWIsInputReady, mGLFWIsUseStackQueue = false;
public static final byte[] keyDownBuffer = new byte[316];
public static final byte[] keyDownBuffer = new byte[317];
public static long mainContext = 0;
static {
try {
@@ -1091,7 +1091,7 @@ public class GLFW
break;
case CallbackBridge.EVENT_TYPE_KEY:
if (mGLFWKeyCallback != null) {
keyDownBuffer[dataArr[1]-32]=(byte)(int)dataArr[3];
keyDownBuffer[Math.max(0, dataArr[1]-31)]=(byte)(int)dataArr[3];
mGLFWKeyCallback.invoke(ptr, dataArr[1], dataArr[2], dataArr[3], dataArr[4]);
}
break;
@@ -1178,7 +1178,7 @@ public class GLFW
}
public static int glfwGetKey(@NativeType("GLFWwindow *") long window, int key) {
return keyDownBuffer[key-32];
return keyDownBuffer[Math.max(0, key-31)];
}
public static int glfwGetMouseButton(@NativeType("GLFWwindow *") long window, int button) {