1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Merge branch 'master' into fix-clicking-metadata-relevance-sort

This commit is contained in:
Dean Herbert 2023-02-01 19:39:13 +09:00 committed by GitHub
commit d54db8de64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 117 additions and 94 deletions

View File

@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.120.0" /> <PackageReference Include="ppy.osu.Framework.Android" Version="2023.131.0" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged. <!-- Fody does not handle Android build well, and warns when unchanged.

View File

@ -164,10 +164,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
const float shrink_size = 0.8f; const float shrink_size = 0.8f;
// When the user has hit lighting disabled, we won't be showing the bright white flash.
// To make things look good, the surrounding animations are also slightly adjusted.
bool showFlash = configHitLighting.Value;
// Animating with the number present is distracting. // Animating with the number present is distracting.
// The number disappearing is hidden by the bright flash. // The number disappearing is hidden by the bright flash.
number.FadeOut(flash_in_duration / 2); number.FadeOut(flash_in_duration / 2);
@ -204,25 +200,28 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
{ {
outerGradient.ResizeTo(OUTER_GRADIENT_SIZE * shrink_size, resize_duration, Easing.OutElasticHalf); outerGradient.ResizeTo(OUTER_GRADIENT_SIZE * shrink_size, resize_duration, Easing.OutElasticHalf);
if (showFlash) outerGradient
{ .FadeColour(Color4.White, 80)
outerGradient .Then()
.FadeColour(Color4.White, 80) .FadeOut(flash_in_duration);
.Then()
.FadeOut(flash_in_duration);
}
else
{
outerGradient
.FadeColour(Color4.White, flash_in_duration * 8)
.FadeOut(flash_in_duration * 2);
}
} }
if (showFlash) if (configHitLighting.Value)
{
flash.HitLighting = true;
flash.FadeTo(1, flash_in_duration, Easing.OutQuint); flash.FadeTo(1, flash_in_duration, Easing.OutQuint);
this.FadeOut(showFlash ? fade_out_time : fade_out_time / 2, Easing.OutQuad); this.FadeOut(fade_out_time, Easing.OutQuad);
}
else
{
flash.HitLighting = false;
flash.FadeTo(1, flash_in_duration, Easing.OutQuint)
.Then()
.FadeOut(flash_in_duration, Easing.OutQuint);
this.FadeOut(fade_out_time * 0.8f, Easing.OutQuad);
}
break; break;
} }
@ -254,6 +253,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
Child.AlwaysPresent = true; Child.AlwaysPresent = true;
} }
public bool HitLighting { get; set; }
protected override void Update() protected override void Update()
{ {
base.Update(); base.Update();
@ -262,7 +263,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = Colour, Colour = Colour,
Radius = OsuHitObject.OBJECT_RADIUS * 1.2f, Radius = OsuHitObject.OBJECT_RADIUS * (HitLighting ? 1.2f : 0.6f),
}; };
} }
} }

View File

@ -150,6 +150,8 @@ namespace osu.Game.Tests.Rulesets
public IBindable<double> AggregateTempo => throw new NotImplementedException(); public IBindable<double> AggregateTempo => throw new NotImplementedException();
public int PlaybackConcurrency { get; set; } public int PlaybackConcurrency { get; set; }
public void AddExtension(string extension) => throw new NotImplementedException();
} }
private class TestShaderManager : ShaderManager private class TestShaderManager : ShaderManager

View File

@ -1,12 +1,11 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
#nullable disable
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Extensions; using osu.Framework.Extensions;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
@ -20,29 +19,36 @@ namespace osu.Game.Tests.Skins
public partial class TestSceneBeatmapSkinResources : OsuTestScene public partial class TestSceneBeatmapSkinResources : OsuTestScene
{ {
[Resolved] [Resolved]
private BeatmapManager beatmaps { get; set; } private BeatmapManager beatmaps { get; set; } = null!;
private IWorkingBeatmap beatmap; [Test]
public void TestRetrieveOggAudio()
[BackgroundDependencyLoader]
private void load()
{ {
var imported = beatmaps.Import(new ImportTask(TestResources.OpenResource("Archives/ogg-beatmap.osz"), "ogg-beatmap.osz")).GetResultSafely(); IWorkingBeatmap beatmap = null!;
imported?.PerformRead(s => AddStep("import beatmap", () => beatmap = importBeatmapFromArchives(@"ogg-beatmap.osz"));
AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo(@"sample")) != null);
AddAssert("track is non-null", () =>
{ {
beatmap = beatmaps.GetWorkingBeatmap(s.Beatmaps[0]); using (var track = beatmap.LoadTrack())
return track is not TrackVirtual;
}); });
} }
[Test] [Test]
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo("sample")) != null); public void TestRetrievalWithConflictingFilenames()
[Test]
public void TestRetrieveOggTrack() => AddAssert("track is non-null", () =>
{ {
using (var track = beatmap.LoadTrack()) IWorkingBeatmap beatmap = null!;
return track is not TrackVirtual;
}); AddStep("import beatmap", () => beatmap = importBeatmapFromArchives(@"conflicting-filenames-beatmap.osz"));
AddAssert("texture is non-null", () => beatmap.Skin.GetTexture(@"spinner-osu") != null);
AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo(@"spinner-osu")) != null);
}
private IWorkingBeatmap importBeatmapFromArchives(string filename)
{
var imported = beatmaps.Import(new ImportTask(TestResources.OpenResource($@"Archives/{filename}"), filename)).GetResultSafely();
return imported.AsNonNull().PerformRead(s => beatmaps.GetWorkingBeatmap(s.Beatmaps[0]));
}
} }
} }

View File

@ -31,17 +31,24 @@ namespace osu.Game.Tests.Skins
[Resolved] [Resolved]
private SkinManager skins { get; set; } = null!; private SkinManager skins { get; set; } = null!;
private ISkin skin = null!; [Test]
public void TestRetrieveOggSample()
[BackgroundDependencyLoader]
private void load()
{ {
var imported = skins.Import(new ImportTask(TestResources.OpenResource("Archives/ogg-skin.osk"), "ogg-skin.osk")).GetResultSafely(); ISkin skin = null!;
skin = imported.PerformRead(skinInfo => skins.GetSkin(skinInfo));
AddStep("import skin", () => skin = importSkinFromArchives(@"ogg-skin.osk"));
AddAssert("sample is non-null", () => skin.GetSample(new SampleInfo(@"sample")) != null);
} }
[Test] [Test]
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => skin.GetSample(new SampleInfo("sample")) != null); public void TestRetrievalWithConflictingFilenames()
{
ISkin skin = null!;
AddStep("import skin", () => skin = importSkinFromArchives(@"conflicting-filenames-skin.osk"));
AddAssert("texture is non-null", () => skin.GetTexture(@"spinner-osu") != null);
AddAssert("sample is non-null", () => skin.GetSample(new SampleInfo(@"spinner-osu")) != null);
}
[Test] [Test]
public void TestSampleRetrievalOrder() public void TestSampleRetrievalOrder()
@ -78,6 +85,12 @@ namespace osu.Game.Tests.Skins
}); });
} }
private Skin importSkinFromArchives(string filename)
{
var imported = skins.Import(new ImportTask(TestResources.OpenResource($@"Archives/{filename}"), filename)).GetResultSafely();
return imported.PerformRead(skinInfo => skins.GetSkin(skinInfo));
}
private class TestSkin : Skin private class TestSkin : Skin
{ {
public const string SAMPLE_NAME = "test-sample"; public const string SAMPLE_NAME = "test-sample";

View File

@ -14,7 +14,7 @@ namespace osu.Game.Tests.Visual.Background
{ {
public partial class TestSceneTriangleBorderShader : OsuTestScene public partial class TestSceneTriangleBorderShader : OsuTestScene
{ {
private readonly TriangleBorder border; private readonly TestTriangle triangle;
public TestSceneTriangleBorderShader() public TestSceneTriangleBorderShader()
{ {
@ -25,11 +25,11 @@ namespace osu.Game.Tests.Visual.Background
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.DarkGreen Colour = Color4.DarkGreen
}, },
border = new TriangleBorder triangle = new TestTriangle
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(100) Size = new Vector2(200)
} }
}; };
} }
@ -38,12 +38,13 @@ namespace osu.Game.Tests.Visual.Background
{ {
base.LoadComplete(); base.LoadComplete();
AddSliderStep("Thickness", 0f, 1f, 0.02f, t => border.Thickness = t); AddSliderStep("Thickness", 0f, 1f, 0.15f, t => triangle.Thickness = t);
AddSliderStep("Texel size", 0f, 0.1f, 0f, t => triangle.TexelSize = t);
} }
private partial class TriangleBorder : Sprite private partial class TestTriangle : Sprite
{ {
private float thickness = 0.02f; private float thickness = 0.15f;
public float Thickness public float Thickness
{ {
@ -55,6 +56,18 @@ namespace osu.Game.Tests.Visual.Background
} }
} }
private float texelSize;
public float TexelSize
{
get => texelSize;
set
{
texelSize = value;
Invalidate(Invalidation.DrawNode);
}
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(ShaderManager shaders, IRenderer renderer) private void load(ShaderManager shaders, IRenderer renderer)
{ {
@ -62,29 +75,32 @@ namespace osu.Game.Tests.Visual.Background
Texture = renderer.WhitePixel; Texture = renderer.WhitePixel;
} }
protected override DrawNode CreateDrawNode() => new TriangleBorderDrawNode(this); protected override DrawNode CreateDrawNode() => new TriangleDrawNode(this);
private class TriangleBorderDrawNode : SpriteDrawNode private class TriangleDrawNode : SpriteDrawNode
{ {
public new TriangleBorder Source => (TriangleBorder)base.Source; public new TestTriangle Source => (TestTriangle)base.Source;
public TriangleBorderDrawNode(TriangleBorder source) public TriangleDrawNode(TestTriangle source)
: base(source) : base(source)
{ {
} }
private float thickness; private float thickness;
private float texelSize;
public override void ApplyState() public override void ApplyState()
{ {
base.ApplyState(); base.ApplyState();
thickness = Source.thickness; thickness = Source.thickness;
texelSize = Source.texelSize;
} }
public override void Draw(IRenderer renderer) public override void Draw(IRenderer renderer)
{ {
TextureShader.GetUniform<float>("thickness").UpdateValue(ref thickness); TextureShader.GetUniform<float>("thickness").UpdateValue(ref thickness);
TextureShader.GetUniform<float>("texelSize").UpdateValue(ref texelSize);
base.Draw(renderer); base.Draw(renderer);
} }

View File

@ -16,6 +16,7 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms; using osu.Game.Online.Rooms;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Screens.OnlinePlay;
using osu.Game.Screens.OnlinePlay.Lounge; using osu.Game.Screens.OnlinePlay.Lounge;
using osu.Game.Screens.OnlinePlay.Multiplayer; using osu.Game.Screens.OnlinePlay.Multiplayer;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match; using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
@ -85,6 +86,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
ClickButtonWhenEnabled<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>(); ClickButtonWhenEnabled<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>();
AddUntilStep("wait for join", () => MultiplayerClient.RoomJoined); AddUntilStep("wait for join", () => MultiplayerClient.RoomJoined);
AddUntilStep("wait for ongoing operation to complete", () => !(CurrentScreen as OnlinePlayScreen).ChildrenOfType<OngoingOperationTracker>().Single().InProgress.Value);
} }
[Test] [Test]

View File

@ -15,7 +15,6 @@ using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Screens.OnlinePlay;
using osu.Game.Screens.OnlinePlay.Multiplayer; using osu.Game.Screens.OnlinePlay.Multiplayer;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match; using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
@ -44,14 +43,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest]
/*
* TearDown : System.TimeoutException : "wait for ongoing operation to complete" timed out
* --TearDown
* at osu.Framework.Testing.Drawables.Steps.UntilStepButton.<>c__DisplayClass11_0.<.ctor>b__0()
* at osu.Framework.Testing.Drawables.Steps.StepButton.PerformStep(Boolean userTriggered)
* at osu.Framework.Testing.TestScene.runNextStep(Action onCompletion, Action`1 onError, Func`2 stopCondition)
*/
public void TestItemAddedToTheEndOfQueue() public void TestItemAddedToTheEndOfQueue()
{ {
addItem(() => OtherBeatmap); addItem(() => OtherBeatmap);
@ -64,7 +55,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestNextItemSelectedAfterGameplayFinish() public void TestNextItemSelectedAfterGameplayFinish()
{ {
addItem(() => OtherBeatmap); addItem(() => OtherBeatmap);
@ -82,7 +72,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestItemsNotClearedWhenSwitchToHostOnlyMode() public void TestItemsNotClearedWhenSwitchToHostOnlyMode()
{ {
addItem(() => OtherBeatmap); addItem(() => OtherBeatmap);
@ -98,7 +87,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestCorrectItemSelectedAfterNewItemAdded() public void TestCorrectItemSelectedAfterNewItemAdded()
{ {
addItem(() => OtherBeatmap); addItem(() => OtherBeatmap);
@ -106,7 +94,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestCorrectRulesetSelectedAfterNewItemAdded() public void TestCorrectRulesetSelectedAfterNewItemAdded()
{ {
addItem(() => OtherBeatmap, new CatchRuleset().RulesetInfo); addItem(() => OtherBeatmap, new CatchRuleset().RulesetInfo);
@ -124,7 +111,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestCorrectModsSelectedAfterNewItemAdded() public void TestCorrectModsSelectedAfterNewItemAdded()
{ {
addItem(() => OtherBeatmap, mods: new Mod[] { new OsuModDoubleTime() }); addItem(() => OtherBeatmap, mods: new Mod[] { new OsuModDoubleTime() });
@ -153,7 +139,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddUntilStep("wait for song select", () => (songSelect = CurrentSubScreen as Screens.Select.SongSelect) != null); AddUntilStep("wait for song select", () => (songSelect = CurrentSubScreen as Screens.Select.SongSelect) != null);
AddUntilStep("wait for loaded", () => songSelect.AsNonNull().BeatmapSetsLoaded); AddUntilStep("wait for loaded", () => songSelect.AsNonNull().BeatmapSetsLoaded);
AddUntilStep("wait for ongoing operation to complete", () => !(CurrentScreen as OnlinePlayScreen).ChildrenOfType<OngoingOperationTracker>().Single().InProgress.Value);
if (ruleset != null) if (ruleset != null)
AddStep($"set {ruleset.Name} ruleset", () => songSelect.AsNonNull().Ruleset.Value = ruleset); AddStep($"set {ruleset.Name} ruleset", () => songSelect.AsNonNull().Ruleset.Value = ruleset);

View File

@ -50,14 +50,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest]
/*
* TearDown : System.TimeoutException : "wait for ongoing operation to complete" timed out
* --TearDown
* at osu.Framework.Testing.Drawables.Steps.UntilStepButton.<>c__DisplayClass11_0.<.ctor>b__0()
* at osu.Framework.Testing.Drawables.Steps.StepButton.PerformStep(Boolean userTriggered)
* at osu.Framework.Testing.TestScene.runNextStep(Action onCompletion, Action`1 onError, Func`2 stopCondition)
*/
public void TestItemStillSelectedAfterChangeToSameBeatmap() public void TestItemStillSelectedAfterChangeToSameBeatmap()
{ {
selectNewItem(() => InitialBeatmap); selectNewItem(() => InitialBeatmap);
@ -66,7 +58,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestItemStillSelectedAfterChangeToOtherBeatmap() public void TestItemStillSelectedAfterChangeToOtherBeatmap()
{ {
selectNewItem(() => OtherBeatmap); selectNewItem(() => OtherBeatmap);
@ -75,7 +66,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestOnlyLastItemChangedAfterGameplayFinished() public void TestOnlyLastItemChangedAfterGameplayFinished()
{ {
RunGameplay(); RunGameplay();
@ -90,7 +80,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
} }
[Test] [Test]
[FlakyTest] // See above
public void TestAddItemsAsHost() public void TestAddItemsAsHost()
{ {
addItem(() => OtherBeatmap); addItem(() => OtherBeatmap);
@ -115,7 +104,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddUntilStep("wait for song select", () => CurrentSubScreen is Screens.Select.SongSelect select && select.BeatmapSetsLoaded); AddUntilStep("wait for song select", () => CurrentSubScreen is Screens.Select.SongSelect select && select.BeatmapSetsLoaded);
BeatmapInfo otherBeatmap = null; BeatmapInfo otherBeatmap = null;
AddUntilStep("wait for ongoing operation to complete", () => !(CurrentScreen as OnlinePlayScreen).ChildrenOfType<OngoingOperationTracker>().Single().InProgress.Value);
AddStep("select other beatmap", () => ((Screens.Select.SongSelect)CurrentSubScreen).FinaliseSelection(otherBeatmap = beatmap())); AddStep("select other beatmap", () => ((Screens.Select.SongSelect)CurrentSubScreen).FinaliseSelection(otherBeatmap = beatmap()));
AddUntilStep("wait for return to match", () => CurrentSubScreen is MultiplayerMatchSubScreen); AddUntilStep("wait for return to match", () => CurrentSubScreen is MultiplayerMatchSubScreen);
@ -131,7 +119,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
}); });
AddUntilStep("wait for song select", () => CurrentSubScreen is Screens.Select.SongSelect select && select.BeatmapSetsLoaded); AddUntilStep("wait for song select", () => CurrentSubScreen is Screens.Select.SongSelect select && select.BeatmapSetsLoaded);
AddUntilStep("wait for ongoing operation to complete", () => !(CurrentScreen as OnlinePlayScreen).ChildrenOfType<OngoingOperationTracker>().Single().InProgress.Value);
AddStep("select other beatmap", () => ((Screens.Select.SongSelect)CurrentSubScreen).FinaliseSelection(beatmap())); AddStep("select other beatmap", () => ((Screens.Select.SongSelect)CurrentSubScreen).FinaliseSelection(beatmap()));
AddUntilStep("wait for return to match", () => CurrentSubScreen is MultiplayerMatchSubScreen); AddUntilStep("wait for return to match", () => CurrentSubScreen is MultiplayerMatchSubScreen);
} }

View File

@ -42,8 +42,12 @@ namespace osu.Game.Graphics.Containers.Markdown
protected override void AddFootnoteBacklink(FootnoteLink footnoteBacklink) => AddDrawable(new OsuMarkdownFootnoteBacklink(footnoteBacklink)); protected override void AddFootnoteBacklink(FootnoteLink footnoteBacklink) => AddDrawable(new OsuMarkdownFootnoteBacklink(footnoteBacklink));
protected override SpriteText CreateEmphasisedSpriteText(bool bold, bool italic) protected override void ApplyEmphasisedCreationParameters(SpriteText spriteText, bool bold, bool italic)
=> CreateSpriteText().With(t => t.Font = t.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic)); {
base.ApplyEmphasisedCreationParameters(spriteText, bold, italic);
spriteText.Font = spriteText.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic);
}
protected override void AddCustomComponent(CustomContainerInline inline) protected override void AddCustomComponent(CustomContainerInline inline)
{ {

View File

@ -14,7 +14,7 @@ using osuTK;
namespace osu.Game.Overlays.Profile.Header namespace osu.Game.Overlays.Profile.Header
{ {
public partial class MedalHeaderContainer : CompositeDrawable public partial class BadgeHeaderContainer : CompositeDrawable
{ {
private FillFlowContainer badgeFlowContainer = null!; private FillFlowContainer badgeFlowContainer = null!;

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Profile
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
User = { BindTarget = User }, User = { BindTarget = User },
}, },
new MedalHeaderContainer new BadgeHeaderContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
User = { BindTarget = User }, User = { BindTarget = User },

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
var directoryInfos = target.GetDirectories(); var directoryInfos = target.GetDirectories();
var fileInfos = target.GetFiles(); var fileInfos = target.GetFiles();
if (directoryInfos.Length > 0 || fileInfos.Length > 0) if (directoryInfos.Length > 0 || fileInfos.Length > 0 || target.Parent == null)
{ {
// Quick test for whether there's already an osu! install at the target path. // Quick test for whether there's already an osu! install at the target path.
if (fileInfos.Any(f => f.Name == OsuGameBase.CLIENT_DATABASE_FILENAME)) if (fileInfos.Any(f => f.Name == OsuGameBase.CLIENT_DATABASE_FILENAME))
@ -65,7 +65,9 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
return; return;
} }
target = target.CreateSubdirectory("osu-lazer"); // Not using CreateSubDirectory as it throws unexpectedly when attempting to create a directory when already at the root of a disk.
// See https://cs.github.com/dotnet/runtime/blob/f1bdd5a6182f43f3928b389b03f7bc26f826c8bc/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs#L88-L94
target = Directory.CreateDirectory(Path.Combine(target.FullName, @"osu-lazer"));
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -157,6 +157,8 @@ namespace osu.Game.Rulesets.UI
set => throw new NotSupportedException(); set => throw new NotSupportedException();
} }
public void AddExtension(string extension) => throw new NotSupportedException();
public void Dispose() public void Dispose()
{ {
if (primary.IsNotNull()) primary.Dispose(); if (primary.IsNotNull()) primary.Dispose();

View File

@ -69,12 +69,15 @@ namespace osu.Game.Skinning
storage ??= realmBackedStorage = new RealmBackedResourceStore<SkinInfo>(SkinInfo, resources.Files, resources.RealmAccess); storage ??= realmBackedStorage = new RealmBackedResourceStore<SkinInfo>(SkinInfo, resources.Files, resources.RealmAccess);
var samples = resources.AudioManager?.GetSampleStore(storage); var samples = resources.AudioManager?.GetSampleStore(storage);
if (samples != null) if (samples != null)
{
samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY; samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY;
// osu-stable performs audio lookups in order of wav -> mp3 -> ogg. // osu-stable performs audio lookups in order of wav -> mp3 -> ogg.
// The GetSampleStore() call above internally adds wav and mp3, so ogg is added at the end to ensure expected ordering. // The GetSampleStore() call above internally adds wav and mp3, so ogg is added at the end to ensure expected ordering.
(storage as ResourceStore<byte[]>)?.AddExtension("ogg"); samples.AddExtension(@"ogg");
}
Samples = samples; Samples = samples;
Textures = new TextureStore(resources.Renderer, new MaxDimensionLimitedTextureLoaderStore(resources.CreateTextureLoaderStore(storage))); Textures = new TextureStore(resources.Renderer, new MaxDimensionLimitedTextureLoaderStore(resources.CreateTextureLoaderStore(storage)));

View File

@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Realm" Version="10.18.0" /> <PackageReference Include="Realm" Version="10.18.0" />
<PackageReference Include="ppy.osu.Framework" Version="2023.120.0" /> <PackageReference Include="ppy.osu.Framework" Version="2023.131.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1221.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2022.1221.0" />
<PackageReference Include="Sentry" Version="3.23.1" /> <PackageReference Include="Sentry" Version="3.23.1" />
<PackageReference Include="SharpCompress" Version="0.32.2" /> <PackageReference Include="SharpCompress" Version="0.32.2" />

View File

@ -16,6 +16,6 @@
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier> <RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2023.120.0" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2023.131.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>