From 6fc5f872edf8c4b71a77c20fadd86eb60e7b927b Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 17 Aug 2025 19:21:55 +0900 Subject: [PATCH] Fix runtime crash due to missing AOT module --- SDL3-CS/JetBrainsAnnotations.cs | 29 +++++++++++++++++++++++++++++ SDL3-CS/SDL3-CS.csproj | 4 ---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 SDL3-CS/JetBrainsAnnotations.cs diff --git a/SDL3-CS/JetBrainsAnnotations.cs b/SDL3-CS/JetBrainsAnnotations.cs new file mode 100644 index 0000000..72d6be2 --- /dev/null +++ b/SDL3-CS/JetBrainsAnnotations.cs @@ -0,0 +1,29 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; + +// https://github.com/JetBrains/JetBrains.Annotations/blob/988289d09aad925b22a5321c075a735cb9597e59/src/Annotations.cs +namespace JetBrains.Annotations +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)] + internal sealed class MustDisposeResourceAttribute : Attribute + { + public MustDisposeResourceAttribute() + { + Value = true; + } + + public MustDisposeResourceAttribute(bool value) + { + Value = value; + } + + /// + /// When set to false, disposing of the resource is not obligatory. + /// The main use-case for explicit [MustDisposeResource(false)] annotation + /// is to loosen the annotation for inheritors. + /// + public bool Value { get; } + } +} diff --git a/SDL3-CS/SDL3-CS.csproj b/SDL3-CS/SDL3-CS.csproj index 3fa7652..cae31a2 100644 --- a/SDL3-CS/SDL3-CS.csproj +++ b/SDL3-CS/SDL3-CS.csproj @@ -32,10 +32,6 @@ - - all - - all