| Summary: | SDL_RenderSetLogicalSize wrecks mouse motion | ||
|---|---|---|---|
| Product: | SDL | Reporter: | hmk <sdl> |
| Component: | render | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.10 | Keywords: | target-2.0.14 |
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Patch: keep track of xrel/yrel remainder and don't round so madly
add a hint for toggling relative scaling |
||
|
Description
hmk
2019-09-30 10:45:56 UTC
Created attachment 3975 [details]
Patch: keep track of xrel/yrel remainder and don't round so madly
PoC for what I proposed at the end.
This completely eliminates angle snapping for me, and makes sensitivity consistent. In other words, it's completely usable for, say, aiming in a first person shooter.
I still don't like that sensitivity changes with scale, but I don't know if changing that would break existing applications
Created attachment 3976 [details]
add a hint for toggling relative scaling
Add a hint (SDL_HINT_MOUSE_RELATIVE_SCALING) that can be used to turn off scaling. Should apply on top of the previous patch.
This looks good to me. I'm going to clean up the truncf call to use an SDL equivalent in the morning and apply this patch. --ryan. (In reply to Ryan C. Gordon from comment #3) > This looks good to me. I'm going to clean up the truncf call to use an SDL > equivalent in the morning and apply this patch. Ok, these patches (and an initial SDL_truncf implementation) are in revision control, thanks! https://hg.libsdl.org/SDL/rev/67759565622a https://hg.libsdl.org/SDL/rev/b583c5ca2fe2 https://hg.libsdl.org/SDL/rev/293eb6ce40ed --ryan. |