Migrate from SDL2 to SDL3

Refs <https://wiki.libsdl.org/SDL3/README-migration>
This commit is contained in:
Romain Vimont
2025-07-11 09:42:03 +02:00
parent 7fd2e486e2
commit 3dcd0baa63
38 changed files with 854 additions and 661 deletions

View File

@@ -10,8 +10,8 @@
/* Forward declarations */
typedef struct SDL_Thread SDL_Thread;
typedef struct SDL_mutex SDL_mutex;
typedef struct SDL_cond SDL_cond;
typedef struct SDL_Mutex SDL_Mutex;
typedef struct SDL_Condition SDL_Condition;
typedef int sc_thread_fn(void *);
typedef unsigned sc_thread_id;
@@ -29,14 +29,14 @@ enum sc_thread_priority {
};
typedef struct sc_mutex {
SDL_mutex *mutex;
SDL_Mutex *mutex;
#ifndef NDEBUG
sc_atomic_thread_id locker;
#endif
} sc_mutex;
typedef struct sc_cond {
SDL_cond *cond;
SDL_Condition *cond;
} sc_cond;
extern sc_thread_id SC_MAIN_THREAD_ID;