| Summary: | SDL_HapticEffect limits | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ryan C. Gordon <icculus> |
| Component: | haptic | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | flibitijibibo, sezeroz |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | All | ||
| Attachments: | Patch to fix Linux magnitude scaling, add FIXME | ||
|
Description
Ryan C. Gordon
2018-04-01 07:45:03 UTC
Created attachment 3239 [details]
Patch to fix Linux magnitude scaling, add FIXME
Attached is a patch that at least makes the runtime output consistent, but it's honestly really hard to tell what should be clamped to what and when it should be clamped. Because of that the patch does not touch the test program, but it at least fixes the one platform that stuck out regarding what the magnitude range should be as of the current API.
We should probably take all the clamping that's done in the SYS functions (which all seems to be using a copypasted macro...?) and do it at the surface-level function to make it easier to read. But that's probably risky to do without extensive testing, so I didn't do that either. Will need to spend a day or two cleaning all that up!
Patch added, thanks! https://hg.libsdl.org/SDL/rev/44a639b5f1af This should definitely be revisited for SDL 2.1. |