-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Fix SDL threading on macOS/Linux. #107963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -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", |
There was a problem hiding this comment.
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...
I also fixed the SDL update script to take this into account and document it better, and add the pkgconfig Linux fixup for #106218 (comment). |
lol what a mess:
So we shouldn't build And same issue for the Windows part:
So I guess I'll add back the header but without the corresponding C file to avoid the risk of compiling it... this could definitely be improved somewhat upstream to be more self-contained. |
And fixup pkg-config check for SDL on Linux. Co-authored-by: Rémi Verschelde <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine on Linux, tested with an Xbox Series controller on bluetooth.
Thanks! |
These files are used only on Windows and seems to cause infinite loop on macOS.
Bugsquad edit: