Skip to content

Fix inverted mouse Y axis - #56

Merged
MisterGatto merged 1 commit into
skyprotocol:osp-masterfrom
HugeFrog24:fix/mouse-y-axis
Oct 31, 2026
Merged

MisterGatto merged 1 commit into
skyprotocol:osp-masterfrom
HugeFrog24:fix/mouse-y-axis

Conversation

@HugeFrog24

Copy link
Copy Markdown
Contributor

I doubt many people use a mouse here, but the hover was upside down and that's a real bug. Works on a OnePlus 13. MuMu players won't notice a difference since it passes the mouse as touch input.

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.
@MisterGatto
MisterGatto merged commit d9a53c2 into skyprotocol:osp-master Oct 31, 2026
1 check failed
@HugeFrog24
HugeFrog24 deleted the fix/mouse-y-axis branch November 1, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants