mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 15:44:35 +00:00
Win32: Poll only helper window messages at init
This commit is contained in:
parent
8d6f265441
commit
7420814fe2
@ -304,6 +304,7 @@ static void createKeyTables(void)
|
|||||||
//
|
//
|
||||||
static HWND createHelperWindow(void)
|
static HWND createHelperWindow(void)
|
||||||
{
|
{
|
||||||
|
MSG msg;
|
||||||
HWND window = CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,
|
HWND window = CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,
|
||||||
_GLFW_WNDCLASSNAME,
|
_GLFW_WNDCLASSNAME,
|
||||||
L"GLFW helper window",
|
L"GLFW helper window",
|
||||||
@ -336,6 +337,12 @@ static HWND createHelperWindow(void)
|
|||||||
DEVICE_NOTIFY_WINDOW_HANDLE);
|
DEVICE_NOTIFY_WINDOW_HANDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (PeekMessageW(&msg, _glfw.win32.helperWindowHandle, 0, 0, PM_REMOVE))
|
||||||
|
{
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessageW(&msg);
|
||||||
|
}
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,8 +430,6 @@ int _glfwPlatformInit(void)
|
|||||||
if (!_glfw.win32.helperWindowHandle)
|
if (!_glfw.win32.helperWindowHandle)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
_glfwPlatformPollEvents();
|
|
||||||
|
|
||||||
_glfwInitTimerWin32();
|
_glfwInitTimerWin32();
|
||||||
_glfwInitJoysticksWin32();
|
_glfwInitJoysticksWin32();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user