mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-20 21:39:29 +00:00
Various improvements and fixes
This commit is contained in:
parent
411f8950e5
commit
77e4bfd292
9 changed files with 167 additions and 32 deletions
|
@ -3019,20 +3019,20 @@ void Core::onJoystickAdded(int deviceID)
|
|||
}
|
||||
joysticks.push_back(j);
|
||||
done:
|
||||
; // TODO: fixup ActionMapper?
|
||||
;
|
||||
}
|
||||
|
||||
void Core::onJoystickRemoved(int instanceID)
|
||||
{
|
||||
debugLog("Joystick removed");
|
||||
for(size_t i = 0; i < joysticks.size(); ++i)
|
||||
if(joysticks[i]->getInstanceID() == instanceID)
|
||||
{
|
||||
joysticks[i]->shutdown();
|
||||
delete joysticks[i];
|
||||
joysticks[i] = NULL;
|
||||
}
|
||||
// TODO: fixup ActionMapper?
|
||||
if(Joystick *j = joysticks[i])
|
||||
if(j->getInstanceID() == instanceID)
|
||||
{
|
||||
j->shutdown();
|
||||
delete j;
|
||||
joysticks[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Joystick *Core::getJoystick(int idx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue