| Summary: | warpmouse enhancement. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Tristen Ennemuist <tristen.ennemuist> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | API change | ||
| Priority: | P2 | CC: | tristen.ennemuist |
| Version: | HG 1.2 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Tristen Ennemuist
2007-06-04 17:07:06 UTC
Generally, you probably want to hide the mouse and just receive relative moviement deltas instead of warping the mouse. That way it doesn't matter where the real mouse cursor is. --ryan. (In reply to comment #1) > Generally, you probably want to hide the mouse and just receive relative > moviement deltas instead of warping the mouse. That way it doesn't matter where > the real mouse cursor is. > > --ryan. > G'day Ryan, Yeah, that's what I thought too, but in full-screen it stops returning relative movement when it hits the edge of the screen... Like, say for example "mouselook" in Quake, if you can keep moving the mouse to the left, you keep spinning to the left - like forever if you had a desk big enough and an arm long enough ;) Currently, without moving the mouse back to the centre of the screen, the relative movement stops, like I say, when the mouse hits the edge of the screen. So what I really want to do is (after hiding the mouse like you suggest): - Capture the relative x & y for a mouse-motion event. - Process the relative movement event. - Reset the cursor back to the middle of the screen. - Ignore the relative movement event. It seems to me the most efficient way to not process the relative movement for the "Reset" movement is to skip generating the mouse motion event altogether...why generate an event that'll simply be completely ignored? I can (and will in the interim) work around this by setting a flag prior to the "reset" that would indicate that the next mouse motion event should be ignored. Cheers Tristen To be clear, if the mouse cursor is hidden and you're fullscreen, it shouldn't ever hit the edge of the window (it should continue to give relative motion events in a given direction forever). Is this not the case? --ryan. Yes, you're absolutely correct: if the mouse cursor is __hidden__, then it doesn't stop reporting mouse-relative-motion events. Sorry for the confusion, I did all my programming/testing with the mouse-cursor visible so I could visualise what was going on... Many thanks for your help on this one! (In reply to comment #3) > To be clear, if the mouse cursor is hidden and you're fullscreen, it shouldn't > ever hit the edge of the window (it should continue to give relative motion > events in a given direction forever). Is this not the case? > --ryan. Cool, glad it's working for you! --ryan. |