1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Merge pull request #24019 from peppy/framework-update

Apply required nullability changes in line with framework update
This commit is contained in:
Bartłomiej Dach 2023-06-25 06:43:21 +02:00 committed by GitHub
commit d43131ac88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 17 additions and 12 deletions

View File

@ -11,7 +11,7 @@
<AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger> <AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.620.0" /> <PackageReference Include="ppy.osu.Framework.Android" Version="2023.625.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidManifestOverlay Include="$(MSBuildThisFileDirectory)osu.Android\Properties\AndroidManifestOverlay.xml" /> <AndroidManifestOverlay Include="$(MSBuildThisFileDirectory)osu.Android\Properties\AndroidManifestOverlay.xml" />

View File

@ -184,7 +184,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
{ {
MenuItem item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == "Curve type")?.Items.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText); MenuItem item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == "Curve type")?.Items.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText);
item?.Action?.Value(); item?.Action.Value?.Invoke();
}); });
} }
} }

View File

@ -244,7 +244,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
MenuItem? item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText); MenuItem? item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText);
item?.Action?.Value(); item?.Action.Value?.Invoke();
}); });
} }
} }

View File

@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
back = rim; back = rim;
} }
if (target != null) if (target != null && back != null)
{ {
const float scale_amount = 0.05f; const float scale_amount = 0.05f;
const float alpha_amount = 0.5f; const float alpha_amount = 0.5f;

View File

@ -213,7 +213,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("attempt seek", () => AddStep("attempt seek", () =>
{ {
InputManager.MoveMouseTo(getSongProgress()); InputManager.MoveMouseTo(getSongProgress().AsNonNull());
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });

View File

@ -82,7 +82,7 @@ namespace osu.Game.Tests.Visual.Navigation
private OsuButton configureBindingsButton => Game.Settings private OsuButton configureBindingsButton => Game.Settings
.ChildrenOfType<BindingSettings>().SingleOrDefault()? .ChildrenOfType<BindingSettings>().SingleOrDefault()?
.ChildrenOfType<OsuButton>()? .ChildrenOfType<OsuButton>()
.First(b => b.Text.ToString() == "Configure"); .First(b => b.Text.ToString() == "Configure");
private KeyBindingPanel keyBindingPanel => Game.Settings private KeyBindingPanel keyBindingPanel => Game.Settings

View File

@ -59,7 +59,7 @@ namespace osu.Game.Tests.Visual.Online
public void TestBasicDisplay() public void TestBasicDisplay()
{ {
AddStep("Add playing user", () => spectatorClient.SendStartPlay(streamingUser.Id, 0)); AddStep("Add playing user", () => spectatorClient.SendStartPlay(streamingUser.Id, 0));
AddUntilStep("Panel loaded", () => currentlyPlaying.ChildrenOfType<UserGridPanel>()?.FirstOrDefault()?.User.Id == 2); AddUntilStep("Panel loaded", () => currentlyPlaying.ChildrenOfType<UserGridPanel>().FirstOrDefault()?.User.Id == 2);
AddStep("Remove playing user", () => spectatorClient.SendEndPlay(streamingUser.Id)); AddStep("Remove playing user", () => spectatorClient.SendEndPlay(streamingUser.Id));
AddUntilStep("Panel no longer present", () => !currentlyPlaying.ChildrenOfType<UserGridPanel>().Any()); AddUntilStep("Panel no longer present", () => !currentlyPlaying.ChildrenOfType<UserGridPanel>().Any());
} }

View File

@ -825,6 +825,8 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep("Click on a filtered difficulty", () => AddStep("Click on a filtered difficulty", () =>
{ {
Debug.Assert(filteredIcon != null);
InputManager.MoveMouseTo(filteredIcon); InputManager.MoveMouseTo(filteredIcon);
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
@ -918,6 +920,8 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep("Click on a difficulty", () => AddStep("Click on a difficulty", () =>
{ {
Debug.Assert(difficultyIcon != null);
InputManager.MoveMouseTo(difficultyIcon); InputManager.MoveMouseTo(difficultyIcon);
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);

View File

@ -218,7 +218,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("dismiss mod customisation via toggle", () => AddStep("dismiss mod customisation via toggle", () =>
{ {
InputManager.MoveMouseTo(modSelectOverlay.CustomisationButton); InputManager.MoveMouseTo(modSelectOverlay.CustomisationButton.AsNonNull());
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
}); });
assertCustomisationToggleState(disabled: false, active: false); assertCustomisationToggleState(disabled: false, active: false);
@ -558,7 +558,7 @@ namespace osu.Game.Tests.Visual.UserInterface
void navigateAndClick<T>() where T : Drawable void navigateAndClick<T>() where T : Drawable
{ {
InputManager.MoveMouseTo(modSelectOverlay.ChildrenOfType<T>().FirstOrDefault()); InputManager.MoveMouseTo(modSelectOverlay.ChildrenOfType<T>().First());
InputManager.Click(MouseButton.Left); InputManager.Click(MouseButton.Left);
} }
} }

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using osu.Framework; using osu.Framework;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Framework.Platform; using osu.Framework.Platform;
@ -32,7 +33,7 @@ namespace osu.Game.Rulesets
// This null check prevents Android from attempting to load the rulesets from disk, // This null check prevents Android from attempting to load the rulesets from disk,
// as the underlying path "AppContext.BaseDirectory", despite being non-nullable, it returns null on android. // as the underlying path "AppContext.BaseDirectory", despite being non-nullable, it returns null on android.
// See https://github.com/xamarin/xamarin-android/issues/3489. // See https://github.com/xamarin/xamarin-android/issues/3489.
if (RuntimeInfo.StartupDirectory != null) if (RuntimeInfo.StartupDirectory.IsNotNull())
loadFromDisk(); loadFromDisk();
// the event handler contains code for resolving dependency on the game assembly for rulesets located outside the base game directory. // the event handler contains code for resolving dependency on the game assembly for rulesets located outside the base game directory.

View File

@ -36,7 +36,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Realm" Version="10.20.0" /> <PackageReference Include="Realm" Version="10.20.0" />
<PackageReference Include="ppy.osu.Framework" Version="2023.620.0" /> <PackageReference Include="ppy.osu.Framework" Version="2023.625.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.605.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2023.605.0" />
<PackageReference Include="Sentry" Version="3.28.1" /> <PackageReference Include="Sentry" Version="3.28.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.620.0" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2023.625.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>