Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions drivers/sdl/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ if env["builtin_sdl"]:
"stdlib/SDL_string.c",
"stdlib/SDL_strtokr.c",
"thread/SDL_thread.c",
"thread/generic/SDL_syscond.c",
"thread/generic/SDL_sysrwlock.c",
"thread/generic/SDL_systhread.c",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was likely the main issue, it seems like I saw it included in the Windows driver:

thirdparty/sdl/thread/windows/SDL_systhread.c
29:#include "SDL_systhread_c.h"

But I failed to realize this is thread/windows/SDL_systhread_c.h and not thread/generic/SDL_systhread.c.

It's super confusing that they have files with the same names in different folders (so they seem mutually exclusive) but then the Windows one depends on a couple thread/generic files anyway...

"timer/SDL_timer.c",
]

Expand Down Expand Up @@ -182,6 +179,8 @@ if env["builtin_sdl"]:
"joystick/windows/SDL_windows_gaming_input.c",
"joystick/windows/SDL_windowsjoystick.c",
"joystick/windows/SDL_xinputjoystick.c",
"thread/generic/SDL_syscond.c",
"thread/generic/SDL_sysrwlock.c",
"thread/windows/SDL_syscond_cv.c",
"thread/windows/SDL_sysmutex.c",
"thread/windows/SDL_sysrwlock_srw.c",
Expand Down
2 changes: 1 addition & 1 deletion platform/linuxbsd/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def configure(env: "SConsEnvironment"):
if env["sdl"]:
if env["builtin_sdl"]:
env.Append(CPPDEFINES=["SDL_ENABLED"])
elif os.system("pkg-config --exists fontconfig") == 0: # 0 means found
elif os.system("pkg-config --exists sdl3") == 0: # 0 means found
env.ParseConfig("pkg-config sdl3 --cflags --libs")
env.Append(CPPDEFINES=["SDL_ENABLED"])
else:
Expand Down
57 changes: 0 additions & 57 deletions thirdparty/sdl/thread/generic/SDL_systhread.c

This file was deleted.

8 changes: 6 additions & 2 deletions thirdparty/sdl/update-sdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ mkdir $target/sensor
cp -rv sensor/{*.{c,h},dummy} $target/sensor

mkdir $target/thread
cp -rv thread/{*.{c,h},generic,pthread,windows} $target/thread
rm -f $target/thread/generic/SDL_{sysmutex*.{c,h},systls.c}
cp -rv thread/{*.{c,h},pthread,windows} $target/thread
# Despite being 'generic', syssem.c is included in the Unix driver for macOS,
# and syscond/sysrwlock are used by the Windows driver.
# systhread_c.h is included by all these, but we should NOT compile the matching .c file.
mkdir $target/thread/generic
cp -v thread/generic/SDL_{syssem.c,{syscond,sysrwlock}*.{c,h},systhread_c.h} $target/thread/generic

mkdir $target/timer
cp -rv timer/{*.{c,h},unix,windows} $target/timer
Expand Down