Fix joystickButton being used for Joystick(Dis)Connected event

This commit is contained in:
Lorenzooone 2024-04-26 14:01:37 +02:00 committed by Lukas Dürrenberger
parent b0e25088a2
commit 174448f5fa

View File

@ -200,7 +200,7 @@ void WindowImpl::processJoystickEvents()
{ {
Event event; Event event;
event.type = connected ? Event::JoystickConnected : Event::JoystickDisconnected; event.type = connected ? Event::JoystickConnected : Event::JoystickDisconnected;
event.joystickButton.joystickId = i; event.joystickConnect.joystickId = i;
pushEvent(event); pushEvent(event);
// Clear previous axes positions // Clear previous axes positions