The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Yet another bug in the SDL haptic code: testhaptic.c
Elias Vanderstuyft
Guest

Hi guys,

I don't want to irritate you, but I was surprised when I saw this,
it's concerning 'testhaptic.c':
At line 200:
if (supported & SDL_HAPTIC_INERTIA) {
SDL_Log(" effect %d: Condition Inertia\n", nefx);
efx[nefx].type = SDL_HAPTIC_SPRING;
The latter line should be probably:
"efx[nefx].type = SDL_HAPTIC_INERTIA;"

But that's just the bug-report, what's more interesting is the
combination of the following facts:
- 6 years of maintained code without anyone noticing this *tangible* bug:
Line 13:
Copyright (c) 2008, Edgar Simo Serra
Line 2:
Copyright (C) 1997-2014 Sam Lantinga
- Some evidence that this bug might be intentional, maybe even used
for malicious practices Razz
Line 199:
/* The pretty awesome inertia effect. */
- The fact that the original and official maintainer "Edgar Simo
Serra" does not answer to any relevant mail (concerning haptic) on the
SDL mailinglist.

Anyway, sorry for the somewhat inconvenient mail, but some issues
mentioned in this mail should be fixed.

Best regards,
Elias
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Yet another bug in the SDL haptic code: testhaptic.c
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Fixed, thanks!

Most people use the simple rumble effect, so it's not surprising that this was missed.



On Wed, Apr 23, 2014 at 11:42 AM, Elias Vanderstuyft wrote:
Quote:
Hi guys,

I don't want to irritate you, but I was surprised when I saw this,
it's concerning 'testhaptic.c':
At line 200:
    if (supported & SDL_HAPTIC_INERTIA) {
        SDL_Log("   effect %d: Condition Inertia\n", nefx);
        efx[nefx].type = SDL_HAPTIC_SPRING;
The latter line should be probably:
    "efx[nefx].type = SDL_HAPTIC_INERTIA;"

But that's just the bug-report, what's more interesting is the
combination of the following facts:
- 6 years of maintained code without anyone noticing this *tangible* bug:
    Line 13:
        Copyright (c) 2008, Edgar Simo Serra
    Line 2:
        Copyright (C) 1997-2014 Sam Lantinga
- Some evidence that this bug might be intentional, maybe even used
for malicious practices Razz
    Line 199:
        /* The pretty awesome inertia effect. */
- The fact that the original and official maintainer "Edgar Simo
Serra" does not answer to any relevant mail (concerning haptic) on the
SDL mailinglist.

Anyway, sorry for the somewhat inconvenient mail, but some issues
mentioned in this mail should be fixed.

Best regards,
Elias
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Yet another bug in the SDL haptic code: testhaptic.c
Elias Vanderstuyft
Guest

On Sat, Apr 26, 2014 at 9:33 PM, Sam Lantinga wrote:
Quote:
Fixed, thanks!

No problem Smile

Any chance to fix the other (far more important) issues I mentioned in
my "[SDL] Haptic coding bugs and fixes for Linux FF" mail?
They are also related to ForceFeedback, and it's been 1.5 months without answer.

Quote:

Most people use the simple rumble effect, so it's not surprising that this
was missed.

I understand Wink

Elias
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org