From 5be3f3ca7e014686955a62268ba2f669789233ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Aug 2019 12:20:56 +0200 Subject: [PATCH] Platform: if you call Sdl2Application::tickEvent(), it gets disabled. --- src/Magnum/Platform/Sdl2Application.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index 5864be4c8..97de58314 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -966,6 +966,7 @@ class Sdl2Application { */ virtual void exitEvent(ExitEvent& event); + protected: /** * @brief Tick event * @@ -974,9 +975,15 @@ class Sdl2Application { * might be no input events and redraw is not requested. Useful e.g. * for asynchronous task polling. Use @ref setMinimalLoopPeriod()/ * @ref setSwapInterval() to control main loop frequency. + * + * If this implementation gets called from its @cpp override @ce, it + * will effectively stop the tick event from being fired and the app + * returns back to waiting for input events. This can be used to + * disable the tick event when not needed. */ virtual void tickEvent(); + private: /** * @brief Any event *