From c1a374ca0465ca540783ddb8b975623c08e8776d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 16 Feb 2022 02:32:27 -0600 Subject: [PATCH] [nostalgia/core/glfw] Add extra draw before waiting for event to handle possible user input --- src/nostalgia/core/glfw/core.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/core/glfw/core.cpp b/src/nostalgia/core/glfw/core.cpp index f017bfebb..477f0e0de 100644 --- a/src/nostalgia/core/glfw/core.cpp +++ b/src/nostalgia/core/glfw/core.cpp @@ -42,11 +42,15 @@ ox::Error run(Context *ctx) noexcept { } } } else { - sleepTime = 2; + sleepTime = 10; } draw(ctx); glfwSwapBuffers(id->window); if (!ctx->constantRefresh) { + // redraw before sleeping to update things that may have changed due + // to user input this round + draw(ctx); + glfwSwapBuffers(id->window); glfwWaitEventsTimeout(sleepTime); } }