-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
The documentation of the timer callback and functions that create timers say the timer is cancelled when it returns 0.
Line 140 in 53eff7f
* scheduled. If the callback returns 0, the periodic alarm is cancelled. |
Lines 166 to 167 in 53eff7f
* timer interval. If the value returned from the callback is 0, the timer is | |
* canceled. |
Line 203 in 53eff7f
* scheduled. If the callback returns 0, the periodic alarm is cancelled. |
Lines 229 to 230 in 53eff7f
* next timer interval. If the value returned from the callback is 0, the | |
* timer is canceled. |
But SDL_RemoveTimer
talks about removing a timer.
Line 261 in 53eff7f
* Remove a timer created with SDL_AddTimer(). |
I suppose canceling and removing a timer means the same thing, but I think the documentation should clarify this.
Also, the documentation mixes USA's canceled
and UK's cancelled
.
The reason I'm opening this issue is because an error occurs when a timer is removed that was cancelled:
SDL/test/testautomation_timer.c
Lines 163 to 165 in cf267e4
result = SDL_RemoveTimer(id); | |
SDLTest_AssertPass("Call to SDL_RemoveTimer()"); | |
SDLTest_AssertCheck(result < 0, "Check result value, expected: <0, got: %i", result); |