Closed smcameron closed 1 year ago
Hmm, just trying to put the splash screen rendering into the main loop does not work because the main loop does not start until after everything the splash screen is supposed to be monitoring is already completed.
To fix this "properly", maybe the thing to do is to make the splash screen a separate process and communicate progress updates to it via a pipe. Seems kind of silly that that's what it would require though.
Fixed by: 82edd5fb9a7b8ed62cd924cd9eac466ffe7acbe0 Use a separate process instead of a thread for the splash screen
This page https://wiki.libsdl.org/CategoryThread says the following:
However, snis_client does create a window and render in that window in a 2nd thread in splash_screen_fn(), and I did run into some multi-threading issues between SDL_PollEvent() and SDL_DestroyWindow(), supposedly fixed by edd07b574 -- which since that commit I haven't had any further trouble that I know of -- but what I am doing with splash_screen_fn() is apparently still not kosher.
There is another conversation here which is interesting: https://discourse.libsdl.org/t/bug-libsdl-not-thread-safe/17052/6