mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +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_joystickDevices.clear();
|
||||||
m_directInput.reset();
|
m_directInput.reset();
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
|
destroyHelperWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReleaseDirectInput(IDirectInput8 *obj)
|
void ReleaseDirectInput(IDirectInput8 *obj)
|
||||||
@@ -252,6 +253,19 @@ namespace BlackInput
|
|||||||
return 0;
|
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)
|
void CJoystickWindows::addJoystickDevice(const DIDEVICEINSTANCE *pdidInstance)
|
||||||
{
|
{
|
||||||
CJoystickDevice *device = new CJoystickDevice(m_directInput, pdidInstance, this);
|
CJoystickDevice *device = new CJoystickDevice(m_directInput, pdidInstance, this);
|
||||||
|
|||||||
@@ -123,6 +123,9 @@ namespace BlackInput
|
|||||||
//! Creates a hidden DI helper window
|
//! Creates a hidden DI helper window
|
||||||
int createHelperWindow();
|
int createHelperWindow();
|
||||||
|
|
||||||
|
//! Destroys a hidden DI helper window
|
||||||
|
void destroyHelperWindow();
|
||||||
|
|
||||||
//! Add new joystick device
|
//! Add new joystick device
|
||||||
void addJoystickDevice(const DIDEVICEINSTANCE *pdidInstance);
|
void addJoystickDevice(const DIDEVICEINSTANCE *pdidInstance);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user