Added the timerID to the SDL timer callback

Fixes https://github.com/libsdl-org/SDL/issues/2593
This commit is contained in:
Sam Lantinga
2024-05-26 17:56:29 -07:00
parent a5b0041b4a
commit b6360516e4
7 changed files with 53 additions and 42 deletions

View File

@@ -1677,6 +1677,13 @@ If you were using this macro for other things besides SDL ticks values, you can
#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0)
```
The callback passed to SDL_AddTimer() has changed parameters to:
```c
Uint32 SDLCALL TimerCallback(void *userdata, SDL_TimerID timerID, Uint32 interval);
````
The return value of SDL_RemoveTimer() has changed to the standard int error code.
## SDL_touch.h
SDL_GetTouchName is replaced with SDL_GetTouchDeviceName(), which takes an SDL_TouchID instead of an index.