Skip to content

Commit 7fe88dd

Browse files
committed
Add SilkActivity
1 parent 2140d38 commit 7fe88dd

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

sources/Windowing/Windowing/ISurfaceApplication.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
namespace Silk.NET.Windowing;
22

3-
using System.Runtime.Versioning;
4-
53
/// <summary>
64
/// Represents an application running within a surface.
75
/// </summary>
@@ -22,7 +20,6 @@ static abstract void Initialize<TSurface>(TSurface surface)
2220
/// Runs an application using the reference implementation of Silk.NET.Windowing.
2321
/// </summary>
2422
/// <typeparam name="T">The application.</typeparam>
25-
[UnsupportedOSPlatform("android")]
2623
public static sealed partial void Run<T>()
2724
where T : ISurfaceApplication;
2825
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
#if ANDROID
5+
using Org.Libsdl.App;
6+
7+
namespace Silk.NET.Windowing.SDL3;
8+
9+
public abstract class SilkActivity<T> : SDLActivity
10+
where T : ISurfaceApplication
11+
{
12+
protected override void Main() => ISurfaceApplication.Run<T>();
13+
}
14+
#endif

sources/Windowing/Windowing/Silk.NET.Windowing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net8.0-android;net9.0-android;net8.0-ios;net9.0-ios</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<NoWarn>0067</NoWarn> <!-- TODO -->

0 commit comments

Comments
 (0)