From 71317a836a093b39f9d5f18972382f1da329ffd6 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Sat, 18 Jun 2022 23:49:04 +0600 Subject: [PATCH] Prepare code to run in NativeAOT In order to publish using NativeAOT last change required is to target net7.0 CUrrently executable have size 99MB so I would not force that direction --- desktop/FSharpWolfenstein.Desktop.fsproj | 2 ++ desktop/Program.fs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/desktop/FSharpWolfenstein.Desktop.fsproj b/desktop/FSharpWolfenstein.Desktop.fsproj index 63928a4..74c5450 100644 --- a/desktop/FSharpWolfenstein.Desktop.fsproj +++ b/desktop/FSharpWolfenstein.Desktop.fsproj @@ -4,6 +4,7 @@ Exe net6.0 true + true @@ -306,5 +307,6 @@ + diff --git a/desktop/Program.fs b/desktop/Program.fs index daa0829..34e929f 100644 --- a/desktop/Program.fs +++ b/desktop/Program.fs @@ -191,6 +191,8 @@ let main _ = let mutable options = WindowOptions.Default options.Size <- Vector2D(screenWidth * zoom,screenHeight * zoom) options.Title <- "F# Wolfenstein" + Silk.NET.Input.Sdl.SdlInput.RegisterPlatform() + Silk.NET.Input.Glfw.GlfwInput.RegisterPlatform() let window = Window.Create(options) window.add_Load (load window) window.add_Render render