From 31dc2d9c6ee391f9c8ad40dc4d256a6cda84f580 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 1 Oct 2022 20:12:58 +0100 Subject: [PATCH] Fix compilation errors --- src/sys.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sys.zig b/src/sys.zig index e857989..8f86a17 100644 --- a/src/sys.zig +++ b/src/sys.zig @@ -54,7 +54,7 @@ pub const EventLoop = opaque { /// const Implementation = struct { user_prefix: []const u8, - file_system_semaphore: *ext.SDL_Semaphore, + file_system_semaphore: *ext.SDL_sem, file_system_thread: *ext.SDL_Thread, file_system_messages: ?*FileSystemMessage = null, @@ -495,13 +495,13 @@ pub fn runGraphics(comptime Errors: anytype, run: GraphicsRunner(Errors)) Errors var event_loop = EventLoop.Implementation{ .file_system_semaphore = ext.SDL_CreateSemaphore(0) orelse return error.InitFailure, - - .file_system_thread = ext.SDL_CreateThread(EventLoop.processFileSystemMessages, - "File System Worker", &event_loop) orelse return error.InitFailure, - + .file_system_thread = unreachable, .user_prefix = pref_path, }; + event_loop.file_system_thread = ext.SDL_CreateThread(EventLoop.processFileSystemMessages, + "File System Worker", &event_loop) orelse return error.InitFailure; + defer { ext.SDL_DestroyThread(event_loop.file_system_thread); ext.SDL_DestroySemaphore(event_loop.file_system_semaphore);