mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Add glfwWaitEventsTimeout
This function will put the calling thread to sleep until an event arrives or until the specified timeout has elapsed.
This commit is contained in:
@@ -1142,6 +1142,13 @@ void _glfwPlatformWaitEvents(void)
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
void _glfwPlatformWaitEventsTimeout(double timeout)
|
||||
{
|
||||
MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD) (timeout * 1e3), QS_ALLEVENTS);
|
||||
|
||||
_glfwPlatformPollEvents();
|
||||
}
|
||||
|
||||
void _glfwPlatformPostEmptyEvent(void)
|
||||
{
|
||||
_GLFWwindow* window = _glfw.windowListHead;
|
||||
|
||||
Reference in New Issue
Block a user