From 1f38a3a840fdc97d186448951fcc7faeaa8e907e Mon Sep 17 00:00:00 2001 From: HugeFrog24 <62775760+HugeFrog24@users.noreply.github.com> Date: Sat, 31 Oct 2026 20:17:40 +0100 Subject: [PATCH] Flip mouse Y into Sky's program space transformPointToProgram returned view coordinates (origin top-left) unchanged, but Sky's native mouse API expects program space with the origin at the bottom-left. Stock Sky computes new PointF(x, decorViewHeight - y) here, and Canvas's own transformPointToSystem already applies the same flip in the other direction. With a hardware mouse this mirrored the hover position sent to onMouseMovedNative and reversed the sign of the drag delta sent to onMouseDeltaNative, so hover highlights tracked upside down in game. Touch, wheel, buttons and the ImGui overlay do not go through this method and are unchanged. --- app/src/main/java/com/tgc/sky/GameActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/tgc/sky/GameActivity.java b/app/src/main/java/com/tgc/sky/GameActivity.java index 182d311..708d2a1 100644 --- a/app/src/main/java/com/tgc/sky/GameActivity.java +++ b/app/src/main/java/com/tgc/sky/GameActivity.java @@ -722,7 +722,7 @@ private void submitImGuiMousePosition(MotionEvent motionEvent) { private PointF transformPointToProgram(float x, float y) { PointF p = new PointF(); p.x = transformWidthToProgram(x); - p.y = transformHeightToProgram(y); + p.y = getWindow().getDecorView().getHeight() - transformHeightToProgram(y); return p; }