1
Window / Re: Incorrect handling of multiple controllers events
« on: August 28, 2022, 08:35:36 pm »
2.6 does not work
In file JoystickImpl.cpp is wierd logic:
As you all know erase() invalidates iterator used there.
Moreover, there is a problem with indexing connected controllers.
I have two controllers, lets call them red and blue.
Application starts, and red is indexed as 1, and blue is indexed as 0.
When I push red button it is registered as controller 0 button press
When I push blue button it is registered as controller 1 button press
I have tried to debug it on my own, but i have failed... I have not time for it.
I do not care ... I am out.
In file JoystickImpl.cpp is wierd logic:
Quote
// Remove devices that were not connected during the enumeration
for (std::vector<JoystickRecord>::iterator i = joystickList.begin(); i != joystickList.end()
{
if (!i->plugged)
i = joystickList.erase(i);
else
++i;
}
As you all know erase() invalidates iterator used there.
Moreover, there is a problem with indexing connected controllers.
I have two controllers, lets call them red and blue.
Application starts, and red is indexed as 1, and blue is indexed as 0.
When I push red button it is registered as controller 0 button press
When I push blue button it is registered as controller 1 button press
I have tried to debug it on my own, but i have failed... I have not time for it.
I do not care ... I am out.