From b285d1ba8d8b4e2f90c3e1bb1ea060cc08aa6493 Mon Sep 17 00:00:00 2001 From: Nishi Date: Mon, 20 Jul 2026 03:36:31 +0900 Subject: [PATCH] fix tick --- src/core.c | 4 ++-- src/widget/opengl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index c72b868..bcbcb6e 100644 --- a/src/core.c +++ b/src/core.c @@ -527,7 +527,7 @@ static void MwAfterStep(MwWidget handle) { } #endif - if(arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= MwWaitMS) { + if(arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= (MwGetInteger(handle, MwNwaitMS) == MwDEFAULT ? MwWaitMS : MwGetInteger(handle, MwNwaitMS))) { for(i = 0; i < arrlen(handle->tick_list); i++) { MwDispatch(handle->tick_list[i], tick); MwDispatchUserHandler(handle->tick_list[i], MwNtickHandler, NULL); @@ -569,7 +569,7 @@ int MwPending(MwWidget handle) { for(i = 0; i < arrlen(handle->children); i++) { if(MwPending(handle->children[i])) return 1; } - return (arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= MwWaitMS) || (arrlen(handle->destroy_queue) > 0) || (handle->widget_class == NULL ? 0 : MwLLPending(handle->lowlevel)); + return (arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= (MwGetInteger(handle, MwNwaitMS) == MwDEFAULT ? MwWaitMS : MwGetInteger(handle, MwNwaitMS))) || (arrlen(handle->destroy_queue) > 0) || (handle->widget_class == NULL ? 0 : MwLLPending(handle->lowlevel)); } void MwLoop(MwWidget handle) { diff --git a/src/widget/opengl.c b/src/widget/opengl.c index db839ea..30a1cee 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -682,4 +682,4 @@ MWDECL MwClass MwOpenGLClass; MwClass MwOpenGLClass = NULL; #endif -#endif \ No newline at end of file +#endif