Commit f2943c9
committed
Fix getting ID of current thread with SDL3
in SDL3 SDL_ThreadID is the type (that's called SDL_threadID with
lowercase-t in SDL2), while in SDL1.2 and SDL2 SDL_ThreadID() is a
function that returns the current thread's ID.
So calling SDL_ThreadID() (to get the current thread's ID) will compile
on SDL3 (calling the types implicit default-constructor) but not do
anything useful...
To avoid this clash always call SDL_GetCurrentThreadID() (the SDL3 name
of that function) instead and provide a #define to SDL_ThreadID for
SDL1.2 and SDL2 so it works there as well.1 parent c3390f6 commit f2943c9
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
333 | | - | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
362 | 369 | | |
363 | 370 | | |
364 | 371 | | |
365 | | - | |
| 372 | + | |
366 | 373 | | |
367 | 374 | | |
368 | 375 | | |
| |||
0 commit comments