Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does the loading on a separate thread, so we're now loading while fading in and while updating the progress bar (resulting in much faster loads; fade outs still happen only after loading).
I had to separate the virtual gamepad surface and texture (de)initialization code because it was logging error messages, and upon further investigation I learned that per https://wiki.libsdl.org/SDL3/CategoryRender:
I also had to adjust fatal error reporting:
app_fatal
can only be called from the main thread, so during loading we instead propagate atl::expected
and send a custom message to the main thread if there is an error. IntroducesRETURN_IF_ERROR
andASSIGN_OR_RETURN
macros for more ergonomic status propagation.I think I found most of the places where we currently call
app_fatal
during load and replaced them withtl::expected
propagation. If I missed any, we won't see an error dialog for these errors and the loading process will appear to hang with lots of console spam instead.Also adds an advanced (ini-only) setting to skip showing loading screen on fast loads. This is what it looks like on my machine with the threshold set to 500ms.
vokoscreenNG-2024-11-09_22-29-53.mp4