Using SDL joysticks within JNI

I am trying to use SDL for joystick input from within a legacy JNI
library. Everything seems good, but when I call SDL_JoystickGetAxis
the values returned are always zero. SDL_JoystickName,
SDL_JoystickGetNumButtons, etc. all work as expected.

I’m concerned that the problem is that SDL_Main isn’t being used, but
since this is deep within JNI I can’t overwrite main. Is this what my
problem is? Is there some way to do the main initialization near
where I call SDL_Init?

Thanks in advance,

~Thadd Selden________________
Thaddeus Selden
Senior Sofware Engineer with Honors
Raytheon Intelligence and Information Systems

@Thaddeus_Selden
703-560-5000 x2676
~~~~~~~~~~~_/)
“Gentlemen, bring me that horizon.”

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My mistake. I simply forgot to call SDL_JoystickUpdate in my polling
loop.On May 3, 2007, at 8:26 AM, Thaddeus Selden wrote:

I am trying to use SDL for joystick input from within a legacy JNI
library. Everything seems good, but when I call SDL_JoystickGetAxis
the values returned are always zero. SDL_JoystickName,
SDL_JoystickGetNumButtons, etc. all work as expected.

I’m concerned that the problem is that SDL_Main isn’t being used, but
since this is deep within JNI I can’t overwrite main. Is this what my
problem is? Is there some way to do the main initialization near
where I call SDL_Init?

Thanks in advance,

~Thadd Selden


Thaddeus Selden
Senior Sofware Engineer with Honors
Raytheon Intelligence and Information Systems

@Thaddeus_Selden
703-560-5000 x2676
~~~~~~~~~~~_/)
“Gentlemen, bring me that horizon.”


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Thaddeus Selden
Senior Sofware Engineer with Honors
Raytheon Intelligence and Information Systems

@Thaddeus_Selden
703-560-5000 x2676
~~~~~~~~~~~_/)
“Gentlemen, bring me that horizon.”

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGOeBiESe6fcyD+CsRAh0XAKDLrKY6NZbY/2KvKMn3PCW3u7jdOACeIKH5
2orXz6t86sWjIXTWfTNTaO0=
=4Y4T
-----END PGP SIGNATURE-----