Add [UnsupportedOSPlatform("windows")] to `SDL_CreateThread()` functions

See commit: 72353a8ab9
This commit is contained in:
Susko3 2024-04-06 12:54:12 +02:00
parent e5f25b9957
commit 0196aeb249
2 changed files with 13 additions and 0 deletions

View File

@ -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]<IntPtr, int> 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]<IntPtr, int> fn, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const size_t")] nuint stacksize, [NativeTypeName("void*")] IntPtr data);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]

View File

@ -0,0 +1,10 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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")