Added the timerID to the SDL timer callback

Fixes https://github.com/libsdl-org/SDL/issues/2593
This commit is contained in:
Sam Lantinga committed 2024-05-27 07:57:33 -07:00
1 parent a5b0041b4a
commit b6360516e4
7 files changed
+53 -42

No files matched your search

+7
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.