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

Author Topic: JoystickMoveEvent PovX PovY  (Read 1592 times)

0 Members and 1 Guest are viewing this topic.

infrared511

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
JoystickMoveEvent PovX PovY
« on: August 14, 2019, 05:00:40 pm »
I am having trouble understanding why the JoysticMoveEvent keeps registering when there is either no gamepad connected, or when a gamepad is connected but nothing is being moved or pushed. I have printed all the axis and nothing is registering as movement.

Secondly, when PovX is pressed, PovY is registering pressed as well. This goes both ways.

 Is this a bug? Am I missing something here? I am using 2.5.0 on windows ten and have tested multiple controllers, drivers, and computers with the same result. Any help is appreciated.
« Last Edit: September 18, 2019, 01:20:09 pm by infrared511 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: JoystickMoveEvent
« Reply #1 on: September 01, 2019, 09:46:21 pm »
You can see how SFML implements the triggering of the JoystickMove event here.

As such, the logic fabs(currPos - prevPos) >= m_joystickThreshold most hold true, thus there must be some change of state. Maybe you're looking at the wrong gamepad?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

infrared511

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: JoystickMoveEvent
« Reply #2 on: September 04, 2019, 08:41:02 am »
Yes, I understand the implementation... it's why I am so confused. I print out every axis position every frame and there is zero change. Only one controller is connected, but will register with no controllers connected.