1
0
Fork 0
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:
fgenesis 2016-07-17 05:54:09 +02:00
commit 77e4bfd292
9 changed files with 167 additions and 32 deletions

View file

@ -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)