From 4b54c65d3f5a737c3a1634ee6c88bffcb8b4f937 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 29 Aug 2018 15:11:02 +0900 Subject: [PATCH 1/2] Fix single file component loading not actually working correctly --- osu.Game/OsuGame.cs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 94678a9dde..f4afd23c1b 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -506,22 +506,24 @@ namespace osu.Game // we could avoid the need for scheduling altogether. Schedule(() => { - if (asyncLoadStream != null) + var previousLoadStream = asyncLoadStream; + + //chain with existing load stream + asyncLoadStream = Task.Run(async () => { - //chain with existing load stream - asyncLoadStream = asyncLoadStream.ContinueWith(async t => + if (previousLoadStream != null) + await previousLoadStream; + + try { - try - { - await LoadComponentAsync(d, add); - } - catch (OperationCanceledException) - { - } - }); - } - else - asyncLoadStream = LoadComponentAsync(d, add); + Logger.Log($"{d}...", LoggingTarget.Debug); + await LoadComponentAsync(d, add); + Logger.Log($"{d} ✓", LoggingTarget.Debug); + } + catch (OperationCanceledException) + { + } + }); }); } From 20817fdf1dc63cd7a378b8805185dc7a398bd48b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 30 Aug 2018 11:58:30 +0900 Subject: [PATCH 2/2] Avoid using symbol windows can't diplay --- osu.Game/OsuGame.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index f4afd23c1b..78c6fa052b 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -516,9 +516,9 @@ namespace osu.Game try { - Logger.Log($"{d}...", LoggingTarget.Debug); + Logger.Log($"Loading {d}...", LoggingTarget.Debug); await LoadComponentAsync(d, add); - Logger.Log($"{d} ✓", LoggingTarget.Debug); + Logger.Log($"Loaded {d}!", LoggingTarget.Debug); } catch (OperationCanceledException) {