Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SFML1.5] Joysticks NOT Working on Windows Vista / 7...  (Read 1484 times)

0 Members and 1 Guest are viewing this topic.

JeZ-l-Lee

  • Jr. Member
  • **
  • Posts: 80
    • ICQ Messenger - 223180991
    • MSN Messenger - JeZLee@Live.com
    • AOL Instant Messenger - SLNTHERO@aol.com
    • View Profile
    • http://www.SilentHeroProductions.com
    • Email
[SFML1.5] Joysticks NOT Working on Windows Vista / 7...
« on: August 19, 2009, 09:44:24 pm »
[SFML1.5] Joysticks NOT Working on Windows Vista / 7...

Hi,

I can not get joysticks working using SFML 1.5 on Windows Vista & Windows 7...

Here is the source code:
Code: [Select]
float joy0_X_Axis = Input.GetJoystickAxis(0, sf::Joy::AxisX);
float joy0_Y_Axis = Input.GetJoystickAxis(0, sf::Joy::AxisY);
bool joy0_Button_0 = Input.IsJoystickButtonDown(0, 0);

if (joy0_Y_Axis < -50)
{
if (joy0_X_Axis < -50)  JoystickDirection = UPLEFT;
else if (joy0_X_Axis > 50)  JoystickDirection = UPRIGHT;
else  JoystickDirection = UP;
}
else if (joy0_X_Axis < -50)
{
if (joy0_Y_Axis < -50)  JoystickDirection = UPLEFT;
else if (joy0_Y_Axis > 50)  JoystickDirection = DOWNLEFT;
else  JoystickDirection = LEFT;
}
else if (joy0_Y_Axis > 50)
{
if (joy0_X_Axis < -50)  JoystickDirection = DOWNLEFT;
else if (joy0_X_Axis > 50)  JoystickDirection = DOWNRIGHT;
else  JoystickDirection = DOWN;
}
else if (joy0_X_Axis > 50)
{
if (joy0_Y_Axis < -50)  JoystickDirection = UPRIGHT;
else if (joy0_Y_Axis > 50)  JoystickDirection = DOWNRIGHT;
else  JoystickDirection = RIGHT;
}

if (joy0_Button_0 == true)  JoystickButton1 = true;

Joysticks work 100% on my Windows XP SP3 computer,
but on Windows Vista SP1 and Windows 7 RC,
I get no joystick axis or button values?

Any ideas?
JeZ+Lee
Silent Hero Productions(R)
Video Game Design Studio

http://www.SilentHeroProductions.com