mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user