diff --git a/osu.Android.props b/osu.Android.props
index 5ee0573c58..98f9bf1a42 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -63,6 +63,6 @@
-
+
diff --git a/osu.Game.Tests/NonVisual/FramedReplayinputHandlerTest.cs b/osu.Game.Tests/NonVisual/FramedReplayInputHandlerTest.cs
similarity index 94%
rename from osu.Game.Tests/NonVisual/FramedReplayinputHandlerTest.cs
rename to osu.Game.Tests/NonVisual/FramedReplayInputHandlerTest.cs
index 73387fa5ab..18cbd4e7c5 100644
--- a/osu.Game.Tests/NonVisual/FramedReplayinputHandlerTest.cs
+++ b/osu.Game.Tests/NonVisual/FramedReplayInputHandlerTest.cs
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
+using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Game.Replays;
@@ -9,7 +10,7 @@ using osu.Game.Rulesets.Replays;
namespace osu.Game.Tests.NonVisual
{
[TestFixture]
- public class FramedReplayinputHandlerTest
+ public class FramedReplayInputHandlerTest
{
private Replay replay;
private TestInputHandler handler;
@@ -160,10 +161,7 @@ namespace osu.Game.Tests.NonVisual
[Test]
public void TestRewindInsideImportantSection()
{
- // fast forward to important section
- while (handler.SetFrameFromTime(3000) != null)
- {
- }
+ fastForwardToPoint(3000);
setTime(4000, 4000);
confirmCurrentFrame(4);
@@ -205,10 +203,7 @@ namespace osu.Game.Tests.NonVisual
[Test]
public void TestRewindOutOfImportantSection()
{
- // fast forward to important section
- while (handler.SetFrameFromTime(3500) != null)
- {
- }
+ fastForwardToPoint(3500);
confirmCurrentFrame(3);
confirmNextFrame(4);
@@ -227,6 +222,15 @@ namespace osu.Game.Tests.NonVisual
confirmNextFrame(2);
}
+ private void fastForwardToPoint(double destination)
+ {
+ for (int i = 0; i < 1000; i++)
+ if (handler.SetFrameFromTime(destination) == null)
+ return;
+
+ throw new TimeoutException("Seek was never fulfilled");
+ }
+
private void setTime(double set, double? expect)
{
Assert.AreEqual(expect, handler.SetFrameFromTime(set));
@@ -274,6 +278,7 @@ namespace osu.Game.Tests.NonVisual
public TestInputHandler(Replay replay)
: base(replay)
{
+ FrameAccuratePlayback = true;
}
protected override double AllowedImportantTimeSpan => 1000;
diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs
index 4f67139706..65efcaa949 100644
--- a/osu.Game/Beatmaps/BeatmapManager.cs
+++ b/osu.Game/Beatmaps/BeatmapManager.cs
@@ -181,19 +181,18 @@ namespace osu.Game.Beatmaps
lock (workingCache)
{
- var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
+ var working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
- if (cached != null)
- return cached;
+ if (working == null)
+ {
+ if (beatmapInfo.Metadata == null)
+ beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
- if (beatmapInfo.Metadata == null)
- beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
-
- WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
+ workingCache.Add(working = new BeatmapManagerWorkingBeatmap(Files.Store,
+ new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager));
+ }
previous?.TransferTo(working);
- workingCache.Add(working);
-
return working;
}
}
diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs
index 538ec41b3d..ea3318598f 100644
--- a/osu.Game/Database/OsuDbContext.cs
+++ b/osu.Game/Database/OsuDbContext.cs
@@ -41,6 +41,9 @@ namespace osu.Game.Database
{
// required to initialise native SQLite libraries on some platforms.
SQLitePCL.Batteries_V2.Init();
+
+ // https://github.com/aspnet/EntityFrameworkCore/issues/9994#issuecomment-508588678
+ SQLitePCL.raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
}
///
diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs
index 14d356f889..669fd62e45 100644
--- a/osu.Game/Input/Bindings/GlobalActionContainer.cs
+++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs
@@ -39,7 +39,7 @@ namespace osu.Game.Input.Bindings
new KeyBinding(InputKey.F4, GlobalAction.ToggleMute),
new KeyBinding(InputKey.Escape, GlobalAction.Back),
- new KeyBinding(InputKey.MouseButton1, GlobalAction.Back),
+ new KeyBinding(InputKey.ExtraMouseButton1, GlobalAction.Back),
new KeyBinding(InputKey.Space, GlobalAction.Select),
new KeyBinding(InputKey.Enter, GlobalAction.Select),
diff --git a/osu.Game/Online/Leaderboards/Leaderboard.cs b/osu.Game/Online/Leaderboards/Leaderboard.cs
index dea2ff1a21..35f7ba1c1b 100644
--- a/osu.Game/Online/Leaderboards/Leaderboard.cs
+++ b/osu.Game/Online/Leaderboards/Leaderboard.cs
@@ -203,8 +203,13 @@ namespace osu.Game.Online.Leaderboards
public void APIStateChanged(IAPIProvider api, APIState state)
{
- if (state == APIState.Online)
- UpdateScores();
+ switch (state)
+ {
+ case APIState.Online:
+ case APIState.Offline:
+ UpdateScores();
+ break;
+ }
}
protected void UpdateScores()
diff --git a/osu.Game/Overlays/Changelog/ChangelogSingleBuild.cs b/osu.Game/Overlays/Changelog/ChangelogSingleBuild.cs
index 44552b214f..9c3504f477 100644
--- a/osu.Game/Overlays/Changelog/ChangelogSingleBuild.cs
+++ b/osu.Game/Overlays/Changelog/ChangelogSingleBuild.cs
@@ -92,24 +92,16 @@ namespace osu.Game.Overlays.Changelog
});
}
- NavigationIconButton left, right;
-
- fill.AddRange(new[]
+ fill.Insert(-1, new NavigationIconButton(Build.Versions?.Previous)
{
- left = new NavigationIconButton(Build.Versions?.Previous)
- {
- Icon = FontAwesome.Solid.ChevronLeft,
- SelectBuild = b => SelectBuild(b)
- },
- right = new NavigationIconButton(Build.Versions?.Next)
- {
- Icon = FontAwesome.Solid.ChevronRight,
- SelectBuild = b => SelectBuild(b)
- },
+ Icon = FontAwesome.Solid.ChevronLeft,
+ SelectBuild = b => SelectBuild(b)
+ });
+ fill.Insert(1, new NavigationIconButton(Build.Versions?.Next)
+ {
+ Icon = FontAwesome.Solid.ChevronRight,
+ SelectBuild = b => SelectBuild(b)
});
-
- fill.SetLayoutPosition(left, -1);
- fill.SetLayoutPosition(right, 1);
return fill;
}
diff --git a/osu.Game/Overlays/Music/PlaylistList.cs b/osu.Game/Overlays/Music/PlaylistList.cs
index 07040f166d..539601c359 100644
--- a/osu.Game/Overlays/Music/PlaylistList.cs
+++ b/osu.Game/Overlays/Music/PlaylistList.cs
@@ -85,10 +85,7 @@ namespace osu.Game.Overlays.Music
private void addBeatmapSet(BeatmapSetInfo obj) => Schedule(() =>
{
- var newItem = new PlaylistItem(obj) { OnSelect = set => Selected?.Invoke(set) };
-
- items.Add(newItem);
- items.SetLayoutPosition(newItem, items.Count - 1);
+ items.Insert(items.Count - 1, new PlaylistItem(obj) { OnSelect = set => Selected?.Invoke(set) });
});
private void removeBeatmapSet(BeatmapSetInfo obj) => Schedule(() =>
diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs
index f9278bbbd2..17a2d4cf9f 100644
--- a/osu.Game/Overlays/Notifications/NotificationSection.cs
+++ b/osu.Game/Overlays/Notifications/NotificationSection.cs
@@ -26,8 +26,7 @@ namespace osu.Game.Overlays.Notifications
public void Add(Notification notification, float position)
{
- notifications.Add(notification);
- notifications.SetLayoutPosition(notification, position);
+ notifications.Insert((int)position, notification);
}
public IEnumerable AcceptTypes;
diff --git a/osu.Game/Overlays/Profile/Header/MedalHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/MedalHeaderContainer.cs
index 67229a80c0..45bc60f794 100644
--- a/osu.Game/Overlays/Profile/Header/MedalHeaderContainer.cs
+++ b/osu.Game/Overlays/Profile/Header/MedalHeaderContainer.cs
@@ -78,10 +78,8 @@ namespace osu.Game.Overlays.Profile.Header
int displayIndex = index;
LoadComponentAsync(new DrawableBadge(badges[index]), asyncBadge =>
{
- badgeFlowContainer.Add(asyncBadge);
-
// load in stable order regardless of async load order.
- badgeFlowContainer.SetLayoutPosition(asyncBadge, displayIndex);
+ badgeFlowContainer.Insert(displayIndex, asyncBadge);
});
}
}
diff --git a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableProfileScore.cs b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableProfileScore.cs
index 0a90c9b135..b77357edd8 100644
--- a/osu.Game/Overlays/Profile/Sections/Ranks/DrawableProfileScore.cs
+++ b/osu.Game/Overlays/Profile/Sections/Ranks/DrawableProfileScore.cs
@@ -49,8 +49,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
};
- RightFlowContainer.Add(text);
- RightFlowContainer.SetLayoutPosition(text, 1);
+ RightFlowContainer.Insert(1, text);
LeftFlowContainer.Add(new BeatmapMetadataContainer(Score.Beatmap));
LeftFlowContainer.Add(new DrawableDate(Score.Date));
diff --git a/osu.Game/Overlays/Settings/SettingsItem.cs b/osu.Game/Overlays/Settings/SettingsItem.cs
index ae840c8c00..d48c0b6b66 100644
--- a/osu.Game/Overlays/Settings/SettingsItem.cs
+++ b/osu.Game/Overlays/Settings/SettingsItem.cs
@@ -46,8 +46,7 @@ namespace osu.Game.Overlays.Settings
if (text == null)
{
// construct lazily for cases where the label is not needed (may be provided by the Control).
- Add(text = new OsuSpriteText());
- FlowContent.SetLayoutPosition(text, -1);
+ FlowContent.Insert(-1, text = new OsuSpriteText());
}
text.Text = value;
diff --git a/osu.Game/Rulesets/Replays/FramedReplayInputHandler.cs b/osu.Game/Rulesets/Replays/FramedReplayInputHandler.cs
index 3830fa5cbe..4c011388fa 100644
--- a/osu.Game/Rulesets/Replays/FramedReplayInputHandler.cs
+++ b/osu.Game/Rulesets/Replays/FramedReplayInputHandler.cs
@@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Replays
/// When set, we will ensure frames executed by nested drawables are frame-accurate to replay data.
/// Disabling this can make replay playback smoother (useful for autoplay, currently).
///
- public bool FrameAccuratePlayback = true;
+ public bool FrameAccuratePlayback = false;
protected bool HasFrames => Frames.Count > 0;
diff --git a/osu.Game/Screens/Select/Options/BeatmapOptionsOverlay.cs b/osu.Game/Screens/Select/Options/BeatmapOptionsOverlay.cs
index 669264cef0..ede526f9da 100644
--- a/osu.Game/Screens/Select/Options/BeatmapOptionsOverlay.cs
+++ b/osu.Game/Screens/Select/Options/BeatmapOptionsOverlay.cs
@@ -110,8 +110,7 @@ namespace osu.Game.Screens.Select.Options
HotKey = hotkey
};
- buttonsContainer.Add(button);
- buttonsContainer.SetLayoutPosition(button, depth);
+ buttonsContainer.Insert((int)depth, button);
}
}
}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index e872cd1387..436ba90a88 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/osu.iOS.props b/osu.iOS.props
index a319094cb1..c24349bcb5 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -105,8 +105,8 @@
-
-
+
+