Release input devices when application is shutdown

If they are released with the deallocation of CInputManager, we might
run into global deallocation hell.
Also on Windows release all DirectX devices before COM library is closed.

ref T391
This commit is contained in:
Roland Winklmeier
2018-10-05 13:32:01 +02:00
committed by Klaus Basan
parent 910b536dee
commit c42900f959
5 changed files with 19 additions and 3 deletions

View File

@@ -129,6 +129,12 @@ namespace BlackCore
m_lastCombination = combination;
}
void CInputManager::releaseDevices()
{
m_keyboard.reset();
m_joystick.reset();
}
int CInputManager::bindImpl(const QString &action, QObject *receiver, std::function<void (bool)> function)
{
static int index = 0;