Fixed a crash in overworld after kart selection screen when accelerometer is enabled

This commit is contained in:
Deve 2017-09-30 23:07:43 +02:00
parent f1dfabdcc2
commit d99b2d4b5a
2 changed files with 3 additions and 1 deletions

View File

@ -425,7 +425,7 @@ void DeviceManager::updateMultitouchDevice()
if (m_multitouch_device->getPlayer() != m_single_player)
m_multitouch_device->setPlayer(m_single_player);
}
else if (m_assign_mode == NO_ASSIGN) // Don't set the player in NO_ASSIGN mode
else
{
m_multitouch_device->setPlayer(NULL);
}

View File

@ -1185,6 +1185,8 @@ EventPropagation InputManager::input(const SEvent& event)
if (device && device->isAccelerometerActive())
{
m_device_manager->updateMultitouchDevice();
for (unsigned int i = 0; i < device->getButtonsCount(); i++)
{
MultitouchButton* button = device->getButton(i);