1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:04:06 +08:00

Merge pull request #24102 from Susko3/framework-IWindow-changes

Update `SDL2{Desktop}Window` usages in line with framework `IWindow` changes
This commit is contained in:
Dean Herbert 2023-07-07 22:16:29 +09:00 committed by GitHub
commit 214908514f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 10 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.625.0" /> <PackageReference Include="ppy.osu.Framework.Android" Version="2023.707.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidManifestOverlay Include="$(MSBuildThisFileDirectory)osu.Android\Properties\AndroidManifestOverlay.xml" /> <AndroidManifestOverlay Include="$(MSBuildThisFileDirectory)osu.Android\Properties\AndroidManifestOverlay.xml" />

View File

@ -147,14 +147,12 @@ namespace osu.Desktop
{ {
base.SetHost(host); base.SetHost(host);
var desktopWindow = (SDL2DesktopWindow)host.Window;
var iconStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico"); var iconStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico");
if (iconStream != null) if (iconStream != null)
desktopWindow.SetIconFromStream(iconStream); host.Window.SetIconFromStream(iconStream);
desktopWindow.CursorState |= CursorState.Hidden; host.Window.CursorState |= CursorState.Hidden;
desktopWindow.Title = Name; host.Window.Title = Name;
} }
protected override BatteryInfo CreateBatteryInfo() => new SDL2BatteryInfo(); protected override BatteryInfo CreateBatteryInfo() => new SDL2BatteryInfo();

View File

@ -289,9 +289,9 @@ namespace osu.Game
{ {
base.SetHost(host); base.SetHost(host);
if (host.Window is SDL2Window sdlWindow) if (host.Window != null)
{ {
sdlWindow.DragDrop += path => host.Window.DragDrop += path =>
{ {
// on macOS/iOS, URL associations are handled via SDL_DROPFILE events. // on macOS/iOS, URL associations are handled via SDL_DROPFILE events.
if (path.StartsWith(OSU_PROTOCOL, StringComparison.Ordinal)) if (path.StartsWith(OSU_PROTOCOL, StringComparison.Ordinal))

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="11.1.2" /> <PackageReference Include="Realm" Version="11.1.2" />
<PackageReference Include="ppy.osu.Framework" Version="2023.625.0" /> <PackageReference Include="ppy.osu.Framework" Version="2023.707.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.707.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2023.707.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.625.0" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2023.707.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>