mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
device: fix inability to detect devices with pipelining enabled
This is because the message window is being created in the main thread, but there is nothing processing messages in the main thread.
This commit is contained in:
parent
63d2992d5e
commit
aadc62a96c
@ -391,6 +391,19 @@ on_input_device_removal(HANDLE handle) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Polls the system to see if there are any new devices. In some
|
||||
* implementations this is a no-op.
|
||||
*/
|
||||
void WinInputDeviceManager::
|
||||
update() {
|
||||
MSG msg;
|
||||
while (PeekMessage(&msg, _message_hwnd, WM_INPUT_DEVICE_CHANGE, WM_INPUT, PM_REMOVE)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of the message loop.
|
||||
*/
|
||||
|
@ -52,6 +52,8 @@ private:
|
||||
pmap<HANDLE, WinRawInputDevice *> _raw_devices;
|
||||
pmap<std::string, WinRawInputDevice *> _raw_devices_by_path;
|
||||
|
||||
virtual void update() override;
|
||||
|
||||
static LRESULT WINAPI window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
|
||||
|
||||
typedef CONFIGRET (WINAPI *pCM_Get_DevNode_Property)(DEVINST, const DEVPROPKEY *, DEVPROPTYPE *, PBYTE, PULONG, ULONG);
|
||||
|
Loading…
x
Reference in New Issue
Block a user