mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Destroy DirectInput helper window during shutdown
This commit is contained in:
committed by
Klaus Basan
parent
294b854ed8
commit
4b3d3bba48
@@ -168,6 +168,7 @@ namespace BlackInput
|
||||
m_joystickDevices.clear();
|
||||
m_directInput.reset();
|
||||
CoUninitialize();
|
||||
destroyHelperWindow();
|
||||
}
|
||||
|
||||
void ReleaseDirectInput(IDirectInput8 *obj)
|
||||
@@ -252,6 +253,19 @@ namespace BlackInput
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CJoystickWindows::destroyHelperWindow()
|
||||
{
|
||||
HINSTANCE hInstance = GetModuleHandle(nullptr);
|
||||
|
||||
if (helperWindow == nullptr) { return; }
|
||||
|
||||
DestroyWindow(helperWindow);
|
||||
helperWindow = nullptr;
|
||||
|
||||
UnregisterClass(helperWindowClassName, hInstance);
|
||||
helperWindowClass = 0;
|
||||
}
|
||||
|
||||
void CJoystickWindows::addJoystickDevice(const DIDEVICEINSTANCE *pdidInstance)
|
||||
{
|
||||
CJoystickDevice *device = new CJoystickDevice(m_directInput, pdidInstance, this);
|
||||
|
||||
Reference in New Issue
Block a user