mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -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);
|
||||
} else {
|
||||
if (!isDown) {
|
||||
CallbackBridge.sendCursorPos(CallbackBridge.mouseX, CallbackBridge.mouseY);
|
||||
CallbackBridge.sendMouseKeycode(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT);
|
||||
CallbackBridge.sendMouseEvent(CallbackBridge.mouseX, CallbackBridge.mouseY, LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT);
|
||||
}
|
||||
setRightOverride(isDown);
|
||||
} break;
|
||||
|
@ -19,6 +19,11 @@ public class CallbackBridge {
|
||||
|
||||
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) {
|
||||
sendCursorPos(x, y);
|
||||
sendMouseKeycode(keycode, isDown);
|
||||
@ -27,7 +32,7 @@ public class CallbackBridge {
|
||||
public static void sendCursorPos(int x, int y) {
|
||||
DEBUG_STRING.append("CursorPos=" + x + ", " + y + "\n");
|
||||
mouseX = x;
|
||||
mouseY = y;
|
||||
mouseY = windowHeight - y;
|
||||
sendData(JRE_TYPE_CURSOR_POS, x + ":" + y);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user