Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Emscripten: start timer ids at 1
Browse files Browse the repository at this point in the history
0 is the error return value
  • Loading branch information
Daft-Freak authored Jan 22, 2019
1 parent b5b711e commit a8a4fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timer/SDL_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
SDL_OutOfMemory();
return 0;
}
entry->timerID = data->nextID++;
entry->timerID = ++data->nextID;

entry->timeoutID = EM_ASM_INT({
return Browser.safeSetTimeout(function() {
Expand Down

0 comments on commit a8a4fde

Please sign in to comment.