Joystick problem
"Huepper" <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
Hi Guys,
I am developing a feeder for vJoy (virtual joystick) for my flight simulator.
I use of SDL2 only the joystick part in a worker thread. The whole works so far super
but I have a small problem as long as I have not moved the corresponding joystick axis.
Below the minimized code I use
Code:
SDL_Init(SDL_INIT_JOYSTICK)
Joystick = SDL_JoystickOpen(nJoystick);
while (!done)
{
SDL_JoystickUpdate();
nValue = SDL_JoystickGetAxis(Joystick, nThrottle1);
}
As long as I do not move the joystick axis (nThrottle1), SDL_JoystickGetAxis () always returns 0 (zero) -
and not the current position.
Once the axis is moved, SDL_JoystickGetAxis () works as expected.
What am I doing wrong here?
Thanks
-Uwe
_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org