I’m implementing joystick support for my game and it’s mostly working OK. The problem I am experiencing at the moment is that if the joystick is plugged in when the computer boots up, when I run the game the analogue stick is read as pointing up and left, so it starts moving immediately.
If I tap any direction on the joystick then it stops moving and is all OK with subsequent game restarts until the next time I reboot with the joystick plugged in.
Is there anything I can do to stop this from happening or is this a problem with the way the OS handles the joystick? I’m running Kubuntu Hardy 32bit.
…The value returned by SDL_JoystickGetAxis is a signed integer
(-32768 to 32768) representing the current position of the axis, it
maybe necessary to impose certain tolerances on these values to
account for jitter…
Maybe this help you.
2009/9/2 Richard Sweeney :> Hi,
I’m implementing joystick support for my game and it’s mostly working OK.
The problem I am experiencing at the moment is that if the joystick is
plugged in when the computer boots up, when I run the game the analogue
stick is read as pointing up and left, so it starts moving immediately.
If I tap any direction on the joystick then it stops moving and is all OK
with subsequent game restarts until the next time I reboot with the joystick
plugged in.
Is there anything I can do to stop this from happening or is this a problem
with the way the OS handles the joystick? I’m running Kubuntu Hardy 32bit.
Thanks
Richard
View your other email accounts from your Hotmail inbox. Add them now.
Is this a USB joystick? Did you check the calibration in Ubuntu’s
config settings?
Jonny DOn Wed, Sep 2, 2009 at 5:15 AM, Richard Sweeney wrote:
Hi,
I’m implementing joystick support for my game and it’s mostly working OK.
The problem I am experiencing at the moment is that if the joystick is
plugged in when the computer boots up, when I run the game the analogue
stick is read as pointing up and left, so it starts moving immediately.
If I tap any direction on the joystick then it stops moving and is all OK
with subsequent game restarts until the next time I reboot with the joystick
plugged in.
Is there anything I can do to stop this from happening or is this a problem
with the way the OS handles the joystick? I’m running Kubuntu Hardy 32bit.
Thanks
Richard
View your other email accounts from your Hotmail inbox. Add them now.
OK, I’ll have a look at this. Thanks for your help!> From: grimfang4 at gmail.com
Date: Wed, 2 Sep 2009 15:15:43 -0400
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Analogue Joysticks and Linux
Is this a USB joystick? Did you check the calibration in Ubuntu’s
config settings?
Jonny D
On Wed, Sep 2, 2009 at 5:15 AM, Richard Sweeney<@Richard_Sweeney> wrote:
Hi,
I’m implementing joystick support for my game and it’s mostly working OK.
The problem I am experiencing at the moment is that if the joystick is
plugged in when the computer boots up, when I run the game the analogue
stick is read as pointing up and left, so it starts moving immediately.
If I tap any direction on the joystick then it stops moving and is all OK
with subsequent game restarts until the next time I reboot with the joystick
plugged in.
Is there anything I can do to stop this from happening or is this a problem
with the way the OS handles the joystick? I’m running Kubuntu Hardy 32bit.
Thanks
Richard
View your other email accounts from your Hotmail inbox. Add them now.