allow using system SDL #204
chinmay/zig-sdl3:push-nsouuruxnkyo into master @ -39,11 +39,11 @@ pub const Priority = enum(c.SDL_ThreadPriority) {
/// This enum is available since SDL 3.2.0.
pubconstState=enum(c.SDL_ThreadState){
/// The thread is currently running.
alive,
My system SDL has the following:
typedef enum SDL_ThreadState
{
SDL_THREAD_UNKNOWN, /**< The thread is not valid */
SDL_THREAD_ALIVE, /**< The thread is currently running */
SDL_THREAD_DETACHED, /**< The thread is detached and can't be waited on */
SDL_THREAD_COMPLETE /**< The thread has finished and should be cleaned up with SDL_WaitThread() */
} SDL_ThreadState;
i.e. SDL_THREAD_UNKNOWN is zero and everything else is shifted up by one. This caused tests to fail so I explicitly assigned it
This allows using the (wonderful) bindings without building SDL from source. zig build test -Dext_image -Dext_ttf -fsys=sdl passes
possibly closes #93? not clear if this is what they want
1241fae756
04a89026ad
04a89026ad
a8ab5067da
I've now split it into two commits, the first one just reorders some stuff around in build.zig to make it easier to review the actual changes for system sdl in the second commit
Great job! If this passes CI, then I will merge.
@ -40,3 +40,3 @@
pubconstState=enum(c.SDL_ThreadState){
/// The thread is currently running.
alive,
alive=c.SDL_THREAD_ALIVE,
How did I miss this??? Good catch thanks.
Closes #93
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?