From c887df6ab48c15fc6fad817bb6c86778fbb59d70 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Jan 2019 14:55:36 +0530 Subject: [PATCH] GLFW upstream commit to allow waiting on events without a window https://github.com/glfw/glfw/commit/55b1a16f9061520724fc507a9ef243f641d1ee02 --- glfw/glfw3.h | 12 ------------ glfw/window.c | 6 ------ 2 files changed, 18 deletions(-) diff --git a/glfw/glfw3.h b/glfw/glfw3.h index 182068b71..fd4a9144f 100644 --- a/glfw/glfw3.h +++ b/glfw/glfw3.h @@ -3739,10 +3739,6 @@ GLFWAPI void glfwPollEvents(void); * GLFW will pass those events on to the application callbacks before * returning. * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * * Event processing is not required for joystick input to work. * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref @@ -3790,10 +3786,6 @@ GLFWAPI void glfwWaitEvents(void); * GLFW will pass those events on to the application callbacks before * returning. * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * * Event processing is not required for joystick input to work. * * @param[in] timeout The maximum amount of time, in seconds, to wait. @@ -3817,10 +3809,6 @@ GLFWAPI void glfwWaitEventsTimeout(double timeout); * This function posts an empty event from the current thread to the event * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return. * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * GLFW_PLATFORM_ERROR. * diff --git a/glfw/window.c b/glfw/window.c index dcdbef7d0..c5ab04afb 100644 --- a/glfw/window.c +++ b/glfw/window.c @@ -1126,9 +1126,6 @@ GLFWAPI void glfwWaitEvents(void) { _GLFW_REQUIRE_INIT(); - if (!_glfw.windowListHead) - return; - _glfwPlatformWaitEvents(); } @@ -1152,8 +1149,5 @@ GLFWAPI void glfwPostEmptyEvent(void) { _GLFW_REQUIRE_INIT(); - if (!_glfw.windowListHead) - return; - _glfwPlatformPostEmptyEvent(); }