2

I haven't connected any joysticks to my laptop but SFML detecting as I've. my main loop :

  render_window.clear(sf::Color::White);

            for (int i=0; i<8; i++)
                std::cout << std::boolalpha  << i << " : " 
                << sf::Joystick::isConnected(i) << std::endl;

  render_window.display();

and the console out put is

Failed to set DirectInput device axis mode: 1
0 : true
1 : true
2 : true
3 : true
4 : true
5 : false
6 : false
7 : false
Failed to set DirectInput device axis mode: 1
0 : true
1 : true
2 : true
3 : true
4 : true
5 : false
6 : false
7 : false

from where those joysticks (1,2,3,4) came, is this something wrong with my laptop or ...?

2 Answers2

2

I finally find out it's because of vjoy driver

vJoy is a device driver that bridges the gap between any device that is not a joystick and an application that requires a joystick.

uninstall the driver and no more joysticks

0

If You still have problem with some virtual joystic installed in Your system You have two solution to resolve this problem:

  1. Uninstall Monac HID from keybord (not show name, Youu must show pop up of every device in this section) and from HID device

  2. Change SFML version to newer one from 2020