Ref T254, joystick windows avoid crash when shutting down

Temp.workaround, we do not really understand why it crashes here.
This commit is contained in:
Klaus Basan
2018-02-24 13:06:33 +01:00
parent ed758133e3
commit d3f46f948a

View File

@@ -38,16 +38,17 @@ namespace BlackInput
CJoystickWindows::~CJoystickWindows() CJoystickWindows::~CJoystickWindows()
{ {
// release device before input
if (m_directInputDevice) if (m_directInputDevice)
{ {
m_directInputDevice->Unacquire(); // currently disabled as it causes crashi
m_directInputDevice->Release(); // m_directInputDevice->Release();
m_directInputDevice = nullptr; // m_directInputDevice = nullptr;
} }
if (m_directInput) if (m_directInput)
{ {
m_directInput->Release(); //! \todo hack without input device this crashes
if (m_directInputDevice) { m_directInput->Release(); }
m_directInput = nullptr; m_directInput = nullptr;
} }