From a25b4be3b283531ed02e923d3fc3ee1894747a9b Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 6 Apr 2024 12:54:12 +0200 Subject: [PATCH] Add [UnsupportedOSPlatform("windows")] to `SDL_CreateThread()` functions See commit: 72353a8ab9cb447879daad5e9cff8986581296de --- SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs | 3 +++ SDL3-CS/SDL3/SDL_thread.rsp | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 SDL3-CS/SDL3/SDL_thread.rsp diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs index 9c77900..4a2545f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs @@ -25,6 +25,7 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.Versioning; namespace SDL { @@ -43,9 +44,11 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [UnsupportedOSPlatform("windows")] public static extern SDL_Thread* SDL_CreateThread([NativeTypeName("SDL_ThreadFunction")] delegate* unmanaged[Cdecl] fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [UnsupportedOSPlatform("windows")] public static extern SDL_Thread* SDL_CreateThreadWithStackSize([NativeTypeName("SDL_ThreadFunction")] delegate* unmanaged[Cdecl] fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const size_t")] nuint stacksize, [NativeTypeName("void*")] IntPtr data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/SDL_thread.rsp b/SDL3-CS/SDL3/SDL_thread.rsp new file mode 100644 index 0000000..6b497c5 --- /dev/null +++ b/SDL3-CS/SDL3/SDL_thread.rsp @@ -0,0 +1,10 @@ +# Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +# See the LICENCE file in the repository root for full licence text. + +--with-using +# the SDL_CreateThread symbol name doesn't matter, it just needs to be any symbol defined in SDL_thread.h +SDL_CreateThread=System.Runtime.Versioning + +--with-attribute +SDL_CreateThread=UnsupportedOSPlatform("windows") +SDL_CreateThreadWithStackSize=UnsupportedOSPlatform("windows")