mirror of https://github.com/ppy/SDL3-CS.git
Add missing Win32 and GDK functions
For now, SDL_GDKSuspendGPU and SDL_GDKResumeGPU from SDL_gpu.h are missing from auto-generated bindings. We can add them manually if needed. These missing funtions cause warnings to be logged when running `generate_bindings.py`.
This commit is contained in:
parent
edb9a6b69d
commit
312410a279
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
<auto-generated/>
|
||||
C# bindings for Simple DirectMedia Layer.
|
||||
Original copyright notice of input files:
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public static partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern void SDL_GDKSuspendComplete();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
<auto-generated/>
|
||||
C# bindings for Simple DirectMedia Layer.
|
||||
Original copyright notice of input files:
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public partial struct XTaskQueueObject
|
||||
{
|
||||
}
|
||||
|
||||
public partial struct XUser
|
||||
{
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern SDL_bool SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern SDL_bool SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle);
|
||||
}
|
||||
}
|
||||
|
|
@ -34,5 +34,13 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl]<IntPtr, MSG*, SDL_bool> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[SupportedOSPlatform("Windows")]
|
||||
public static extern SDL_bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,6 +314,7 @@ def main():
|
|||
|
||||
generate_platform_specific_headers(sdl_api, add("SDL3/SDL_main.h"), [
|
||||
(["SDL_PLATFORM_WINDOWS"], "Windows", "Windows"),
|
||||
(["SDL_PLATFORM_GDK"], "GDK", "Windows"),
|
||||
])
|
||||
|
||||
generate_platform_specific_headers(sdl_api, add("SDL3/SDL_system.h"), [
|
||||
|
|
@ -321,7 +322,8 @@ def main():
|
|||
(["SDL_PLATFORM_ANDROID"], "Android", "Android"),
|
||||
(["SDL_PLATFORM_IOS"], "iOS", "iOS"),
|
||||
(["SDL_PLATFORM_LINUX"], "Linux", "Linux"),
|
||||
(["SDL_PLATFORM_WINDOWS"], "Windows", "Windows")
|
||||
(["SDL_PLATFORM_WINDOWS", "SDL_PLATFORM_WIN32"], "Windows", "Windows"),
|
||||
(["SDL_PLATFORM_GDK"], "GDK", "Windows"),
|
||||
])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue