1
Window / AxisPOV always zero, others fine?
« on: January 02, 2010, 06:15:59 am »
I cannot seem to get any sort of non-zero result from any POV hats for the life of me. I've tried two different controllers; a standard Xbox 360 wired controller, and an Xbox 360 arcade stick with no analog axes.
Here's a simple program that I can close using an analog stick but not a POV hat:
I hope I'm missing something obvious.
Here's a simple program that I can close using an analog stick but not a POV hat:
Code: [Select]
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Test Window");
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}
if (App.GetInput().GetJoystickAxis(0, sf::Joy::AxisPOV) == 45)
App.Close();
if (App.GetInput().GetJoystickAxis(0, sf::Joy::AxisX) == 100)
App.Close();
}
return 0;
}
I hope I'm missing something obvious.