Avoid needing to continuously add/remove timers

This commit is contained in:
Kovid Goyal
2019-02-27 08:43:47 +05:30
parent 7624578c21
commit 9f35b9281b
9 changed files with 29 additions and 11 deletions

5
glfw/main_loop.h vendored
View File

@@ -44,3 +44,8 @@ unsigned long long _glfwPlatformAddTimer(double interval, bool repeats, GLFWuser
void _glfwPlatformRemoveTimer(unsigned long long timer_id) {
removeTimer(&_glfw.GLFW_LOOP_BACKEND.eventLoopData, timer_id);
}
void _glfwPlatformUpdateTimer(unsigned long long timer_id, double interval, GLFWbool enabled) {
changeTimerInterval(&_glfw.GLFW_LOOP_BACKEND.eventLoopData, timer_id, interval);
toggleTimer(&_glfw.GLFW_LOOP_BACKEND.eventLoopData, timer_id, enabled);
}