From 123c52222b159d9547e75a45333b3690fc555506 Mon Sep 17 00:00:00 2001
From: Dylan Perks <11160611+Perksey@users.noreply.github.com>
Date: Wed, 27 Sep 2023 13:42:41 -0500
Subject: [PATCH] Update SdlWindowing.cs
---
src/Windowing/Silk.NET.Windowing.Sdl/SdlWindowing.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Windowing/Silk.NET.Windowing.Sdl/SdlWindowing.cs b/src/Windowing/Silk.NET.Windowing.Sdl/SdlWindowing.cs
index ec4c39c71c..d80f5b99bc 100644
--- a/src/Windowing/Silk.NET.Windowing.Sdl/SdlWindowing.cs
+++ b/src/Windowing/Silk.NET.Windowing.Sdl/SdlWindowing.cs
@@ -43,7 +43,11 @@ public static unsafe IView CreateFrom(void* handle, IGLContext? ctx = null)
///
/// Prioritizes the SDL windowing platform over others.
///
- public static void Use() => Window.PrioritizeSdl();
+ public static void Use()
+ {
+ RegisterPlatform(); // may not be done by reflection on NativeAOT
+ Window.PrioritizeSdl();
+ }
///
/// Gets a value indicating whether the given view is an SDL view.