aboutsummaryrefslogtreecommitdiffstats
path: root/source/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/gui.cpp')
-rw-r--r--source/gui.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gui.cpp b/source/gui.cpp
index 9720442..515d471 100644
--- a/source/gui.cpp
+++ b/source/gui.cpp
@@ -108,8 +108,10 @@ void guiRender(void (*func)())
SDL_GL_SwapWindow(window);
}
-void guiHandleEvents(bool& done)
+bool guiHandleEvents()
{
+ bool done = false;
+
for (SDL_Event event; SDL_PollEvent(&event);) {
ImGui_ImplSDL2_ProcessEvent(&event);
if (event.type == SDL_QUIT)
@@ -117,6 +119,8 @@ void guiHandleEvents(bool& done)
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
done = true;
}
+
+ return done;
}
void guiShutdown()