| 391 | static SDL_TimerData SDL_timer_data; |
| 392 | |
| 393 | static void SDL_Emscripten_TimerHelper(void *userdata) |
| 394 | { |
| 395 | SDL_TimerMap *entry = (SDL_TimerMap *)userdata; |
| 396 | entry->interval = entry->callback(entry->interval, entry->param); |
| 397 | if (entry->interval > 0) { |
| 398 | entry->timeoutID = emscripten_set_timeout(&SDL_Emscripten_TimerHelper, |
| 399 | entry->interval, |
| 400 | entry); |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | int SDL_TimerInit(void) |
| 405 | { |