mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 07:05:40 -04:00
Fixes
- Input is never called - Compilation errors
This commit is contained in:
parent
27c329d2c9
commit
a0ffeaf630
@ -13,15 +13,15 @@ struct GLFWInputEvent {
|
|||||||
struct GLFWInputEvent glfwInputEventArr[100];
|
struct GLFWInputEvent glfwInputEventArr[100];
|
||||||
int glfwInputEventIndex;
|
int glfwInputEventIndex;
|
||||||
|
|
||||||
#define EVENT_TYPE_CHAR 1000;
|
#define EVENT_TYPE_CHAR 1000
|
||||||
#define EVENT_TYPE_CHAR_MODS 1001;
|
#define EVENT_TYPE_CHAR_MODS 1001
|
||||||
#define EVENT_TYPE_CURSOR_ENTER 1002;
|
#define EVENT_TYPE_CURSOR_ENTER 1002
|
||||||
#define EVENT_TYPE_CURSOR_POS 1003;
|
#define EVENT_TYPE_CURSOR_POS 1003
|
||||||
#define EVENT_TYPE_FRAMEBUFFER_SIZE 1004;
|
#define EVENT_TYPE_FRAMEBUFFER_SIZE 1004
|
||||||
#define EVENT_TYPE_KEY 1005;
|
#define EVENT_TYPE_KEY 1005
|
||||||
#define EVENT_TYPE_MOUSE_BUTTON 1006;
|
#define EVENT_TYPE_MOUSE_BUTTON 1006
|
||||||
#define EVENT_TYPE_SCROLL 1007;
|
#define EVENT_TYPE_SCROLL 1007
|
||||||
#define EVENT_TYPE_WINDOW_SIZE 1008;
|
#define EVENT_TYPE_WINDOW_SIZE 1008
|
||||||
|
|
||||||
typedef void GLFW_invoke_Char_func(void* window, unsigned int codepoint);
|
typedef void GLFW_invoke_Char_func(void* window, unsigned int codepoint);
|
||||||
typedef void GLFW_invoke_CharMods_func(void* window, unsigned int codepoint, int mods);
|
typedef void GLFW_invoke_CharMods_func(void* window, unsigned int codepoint, int mods);
|
||||||
@ -176,7 +176,8 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeIsGrabbing(J
|
|||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwPollEvents(JNIEnv* env, jclass clazz) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwPollEvents(JNIEnv* env, jclass clazz) {
|
||||||
if (isUsePushPollCall && isInputReady) {
|
if (!isInputReady) isInputReady = true;
|
||||||
|
if (isUsePushPollCall) {
|
||||||
GLFW_invoke_CursorPos(showingWindow, (double) (isGrabbing ? grabCursorX : x), (double) (isGrabbing ? grabCursorY : y));
|
GLFW_invoke_CursorPos(showingWindow, (double) (isGrabbing ? grabCursorX : x), (double) (isGrabbing ? grabCursorY : y));
|
||||||
|
|
||||||
for (int i = 0; i < glfwInputEventIndex; i++) {
|
for (int i = 0; i < glfwInputEventIndex; i++) {
|
||||||
@ -376,12 +377,3 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSetShowingWindow(JNIEnv* en
|
|||||||
showingWindow = (long) window;
|
showingWindow = (long) window;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Class: org_lwjgl_glfw_GLFW
|
|
||||||
* Method: nglfwSetInputReady
|
|
||||||
* Signature: ()V
|
|
||||||
*/
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSetInputReady(JNIEnv *env, jclass cls) {
|
|
||||||
isInputReady = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user