Skip to content

Pass xrel/yrel if SDL relative mouse mode is enabled#283

Closed
oznogon wants to merge 1 commit into
daid:masterfrom
oznogon:fix-relative-mouse-mode
Closed

Pass xrel/yrel if SDL relative mouse mode is enabled#283
oznogon wants to merge 1 commit into
daid:masterfrom
oznogon:fix-relative-mouse-mode

Conversation

@oznogon

@oznogon oznogon commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Add RenderChain and Renderable functions onRelativeMove() and onRelativeDrag() to pass raw SDL event delta values (mouse xrel/yrel, touch dx/dy) instead of translated positions.

If SDL2 relative mouse mode is enabled, pass deltas through these new functions, instead of passing positions through onPointerDrag and onPointerMove.

Follow-up to the weird abuse of interfaces PR #282.

Add RenderChain and Renderable functions onRelativeMove() and
onRelativeDrag() to pass raw SDL event delta values (mouse
xrel/yrel, touch dx/dy) instead of translated positions.

If SDL2 relative mouse mode is enabled, pass deltas through these
new functions, instead of passing positions through onPointerDrag
and onPointerMove.
@daid

daid commented Dec 19, 2025

Copy link
Copy Markdown
Owner

First off, I'm fine with this implementation. But I did check what I did in SP2 with for another experimental project. And there I actually send off the relative mouse movements to the keybinding system. Giving the advantage that you could bind other things (like joysticks) to this action as well. Might be something to consider?

As I said, I'm also fine with this implementation, just thinking out loud here.

@oznogon oznogon closed this Dec 19, 2025
@oznogon
oznogon deleted the fix-relative-mouse-mode branch December 22, 2025 17:33
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