mirror of
https://github.com/libretro/gw-libretro.git
synced 2024-11-30 03:10:22 +00:00
setting interval to 0 disables the timer
This commit is contained in:
parent
1680718300
commit
1aa6700669
@ -24,7 +24,7 @@ static int l_tick( lua_State* L )
|
||||
{
|
||||
gwlua_timer_t* self = l_check( L, 1 );
|
||||
|
||||
if ( self->is_enabled && self->callback_ref != LUA_NOREF && self->state->now >= self->expiration )
|
||||
if ( self->is_enabled && self->callback_ref != LUA_NOREF && self->interval && self->state->now >= self->expiration )
|
||||
{
|
||||
self->expiration = self->interval + self->state->now;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user