mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Merge remote-tracking branch 'upstream/master' into storyboard-clock-di
This commit is contained in:
commit
c9599b65eb
@ -63,6 +63,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.704.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.711.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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;
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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*/);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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),
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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(() =>
|
||||
|
@ -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<Type> AcceptTypes;
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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).
|
||||
/// </summary>
|
||||
public bool FrameAccuratePlayback = true;
|
||||
public bool FrameAccuratePlayback = false;
|
||||
|
||||
protected bool HasFrames => Frames.Count > 0;
|
||||
|
||||
|
@ -110,8 +110,7 @@ namespace osu.Game.Screens.Select.Options
|
||||
HotKey = hotkey
|
||||
};
|
||||
|
||||
buttonsContainer.Add(button);
|
||||
buttonsContainer.SetLayoutPosition(button, depth);
|
||||
buttonsContainer.Insert((int)depth, button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.704.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.711.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
@ -105,8 +105,8 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.704.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.704.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.711.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.711.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user