mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
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:
committed by
Klaus Basan
parent
910b536dee
commit
c42900f959
@@ -165,6 +165,8 @@ namespace BlackInput
|
||||
|
||||
CJoystickWindows::~CJoystickWindows()
|
||||
{
|
||||
m_joystickDevices.clear();
|
||||
m_directInput.reset();
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -134,13 +134,13 @@ namespace BlackInput
|
||||
ATOM helperWindowClass = 0;
|
||||
HWND helperWindow = nullptr;
|
||||
|
||||
const TCHAR *helperWindowClassName = TEXT("HelperWindow");
|
||||
const TCHAR *helperWindowName = TEXT("JoystickCatcherWindow");
|
||||
|
||||
DirectInput8Ptr m_directInput; //!< DirectInput object
|
||||
QVector<CJoystickDevice *> m_joystickDevices; //!< Joystick devices
|
||||
|
||||
BlackMisc::Input::CHotkeyCombination m_buttonCombination;
|
||||
|
||||
const TCHAR *helperWindowClassName = TEXT("HelperWindow");
|
||||
const TCHAR *helperWindowName = TEXT("JoystickCatcherWindow");
|
||||
};
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user