Skip to content

Commit

Permalink
fix: Race condition with Studio banner during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Nov 29, 2024
1 parent b4395b8 commit 78ad223
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ private static void Load() {

Task.Run(async () => {
// Wait for font / dialog to be loaded
while ((Engine.Scene is GameLoader loader && !loader.dialogLoaded) || !GFX.Loaded || Dialog.Languages == null || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) {
// NOTE: 'loader.loaded' is checked instead of 'loader.dialogLoaded' since for the latter, there is a race condition with Fast-Texture-Loading not yet being done
while ((Engine.Scene is GameLoader loader && !loader.loaded) || !GFX.Loaded || Dialog.Languages == null || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) {
await Task.Delay(10).ConfigureAwait(false);
}

Expand Down

0 comments on commit 78ad223

Please sign in to comment.