This commit is contained in:
Camilla Berglund 2015-08-31 02:52:32 +02:00
parent f5cbdbab4f
commit 3dc53e21e5

View File

@ -991,7 +991,6 @@ int _glfwPlatformWindowVisible(_GLFWwindow* window)
void _glfwPlatformPollEvents(void)
{
MSG msg;
_GLFWwindow* window;
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
{
@ -1001,7 +1000,7 @@ void _glfwPlatformPollEvents(void)
// While GLFW does not itself post WM_QUIT, other processes may post
// it to this one, for example Task Manager
window = _glfw.windowListHead;
_GLFWwindow* window = _glfw.windowListHead;
while (window)
{
_glfwInputWindowCloseRequest(window);
@ -1015,9 +1014,10 @@ void _glfwPlatformPollEvents(void)
}
}
window = _glfw.cursorWindow;
if (window)
if (_glfw.cursorWindow)
{
_GLFWwindow* window = _glfw.cursorWindow;
// LSHIFT/RSHIFT fixup (keys tend to "stick" without this fix)
// This is the only async event handling in GLFW, but it solves some
// nasty problems