mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 22:26:56 -04:00
fix invert y
This commit is contained in:
parent
329612ba35
commit
d218a04b68
@ -796,8 +796,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
sendMouseButton(1, isDown);
|
sendMouseButton(1, isDown);
|
||||||
} else {
|
} else {
|
||||||
if (!isDown) {
|
if (!isDown) {
|
||||||
CallbackBridge.sendCursorPos(CallbackBridge.mouseX, CallbackBridge.mouseY);
|
CallbackBridge.sendMouseEvent(CallbackBridge.mouseX, CallbackBridge.mouseY, LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT);
|
||||||
CallbackBridge.sendMouseKeycode(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT);
|
|
||||||
}
|
}
|
||||||
setRightOverride(isDown);
|
setRightOverride(isDown);
|
||||||
} break;
|
} break;
|
||||||
|
@ -19,6 +19,11 @@ public class CallbackBridge {
|
|||||||
|
|
||||||
volatile private static boolean isGrabbing = false;
|
volatile private static boolean isGrabbing = false;
|
||||||
|
|
||||||
|
public static void sendMouseEvent(int x, int y, int keycode) {
|
||||||
|
sendCursorPos(x, y);
|
||||||
|
sendMouseKeycode(keycode);
|
||||||
|
}
|
||||||
|
|
||||||
public static void sendMouseEvent(int x, int y, int keycode, boolean isDown) {
|
public static void sendMouseEvent(int x, int y, int keycode, boolean isDown) {
|
||||||
sendCursorPos(x, y);
|
sendCursorPos(x, y);
|
||||||
sendMouseKeycode(keycode, isDown);
|
sendMouseKeycode(keycode, isDown);
|
||||||
@ -27,7 +32,7 @@ public class CallbackBridge {
|
|||||||
public static void sendCursorPos(int x, int y) {
|
public static void sendCursorPos(int x, int y) {
|
||||||
DEBUG_STRING.append("CursorPos=" + x + ", " + y + "\n");
|
DEBUG_STRING.append("CursorPos=" + x + ", " + y + "\n");
|
||||||
mouseX = x;
|
mouseX = x;
|
||||||
mouseY = y;
|
mouseY = windowHeight - y;
|
||||||
sendData(JRE_TYPE_CURSOR_POS, x + ":" + y);
|
sendData(JRE_TYPE_CURSOR_POS, x + ":" + y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user