mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 07:05:40 -04:00
Add debugs
This commit is contained in:
parent
71e0bdc864
commit
07b52eb2f6
@ -160,9 +160,15 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeIsGrabbing(J
|
|||||||
return isGrabbing;
|
return isGrabbing;
|
||||||
}
|
}
|
||||||
|
|
||||||
int diffX, diffY, diffGrabX, diffGrabY;
|
int diffX, diffY, diffGrabX, diffGrabY, debugTimes;
|
||||||
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 (!isInputReady) isInputReady = true;
|
if (!isInputReady) isInputReady = true;
|
||||||
|
|
||||||
|
if (debugTimes < 1000) {
|
||||||
|
debugTimes++;
|
||||||
|
LOGI("INPUT: IsUseStackQueue=%d, CurrentInputLength=%d, CursorX=%d, CursorY=%d", isUseStackQueueCall, glfwInputEventIndex, lastCursorX, lastCursorY);
|
||||||
|
}
|
||||||
|
|
||||||
if (isUseStackQueueCall) {
|
if (isUseStackQueueCall) {
|
||||||
if (diffX != lastCursorX || diffY != lastCursorY) {
|
if (diffX != lastCursorX || diffY != lastCursorY) {
|
||||||
diffX = lastCursorX;
|
diffX = lastCursorX;
|
||||||
@ -175,6 +181,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwPollEvents(JNIEnv* env, jcl
|
|||||||
|
|
||||||
for (int i = 0; i <= glfwInputEventIndex; i++) {
|
for (int i = 0; i <= glfwInputEventIndex; i++) {
|
||||||
struct GLFWInputEvent curr = glfwInputEventArr[i];
|
struct GLFWInputEvent curr = glfwInputEventArr[i];
|
||||||
|
|
||||||
|
if (debugTimes < 1000) {
|
||||||
|
LOGI("INPUT: Got input event %d", curr.type);
|
||||||
|
}
|
||||||
|
|
||||||
switch (curr.type) {
|
switch (curr.type) {
|
||||||
case EVENT_TYPE_CHAR:
|
case EVENT_TYPE_CHAR:
|
||||||
if (GLFW_invoke_Char) {
|
if (GLFW_invoke_Char) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user