Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_HapticEffect limits #2856

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

SDL_HapticEffect limits #2856

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, x86

Comments on the original bug report:

On 2018-04-01 07:45:03 +0000, Ryan C. Gordon wrote:

All SDL_HapticEffect fields are intended to max out at 0x7FFF, but test/testhaptic.c tries to pass 0xFFFF for several tests. It doesn't appear that SDL makes any attempt to clamp or check this. Not sure if we should fix the test program or SDL.

--ryan.

On 2018-05-05 02:03:27 +0000, Ethan Lee wrote:

Created attachment 3239
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!

On 2018-10-01 16:44:41 +0000, Sam Lantinga wrote:

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/44a639b5f1af

This should definitely be revisited for SDL 2.1.

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

No branches or pull requests

1 participant