Add headers for unsupported sources

This commit is contained in:
Anonymous Maarten
2025-09-25 23:34:09 +02:00
committed by Anonymous Maarten
parent f9f172cf60
commit cdc4609993
10 changed files with 153 additions and 57 deletions

View File

@@ -423,6 +423,7 @@
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
<ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
<ClInclude Include="..\..\src\core\SDL_core_unsupported.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_gameinput.h" />
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
@@ -600,6 +601,7 @@
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
<ClInclude Include="..\..\src\video\SDL_video_unsupported.h" />
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />

View File

@@ -331,6 +331,7 @@
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
<ClInclude Include="..\..\src\core\SDL_core_unsupported.h" />
<ClInclude Include="..\..\src\cpuinfo\SDL_cpuinfo_c.h" />
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
@@ -453,6 +454,7 @@
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
<ClInclude Include="..\..\src\video\SDL_video_unsupported.h" />
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />

View File

@@ -334,6 +334,7 @@
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
<ClInclude Include="..\..\src\camera\SDL_camera_c.h" />
<ClInclude Include="..\..\src\camera\SDL_syscamera.h" />
<ClInclude Include="..\..\src\core\SDL_core_unsupported.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_gameinput.h" />
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
@@ -508,6 +509,7 @@
<ClInclude Include="..\..\src\video\SDL_stb_c.h" />
<ClInclude Include="..\..\src\video\SDL_surface_c.h" />
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
<ClInclude Include="..\..\src\video\SDL_video_unsupported.h" />
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />

View File

@@ -489,6 +489,9 @@
<ClInclude Include="..\..\src\audio\SDL_audioresample.h">
<Filter>audio</Filter>
</ClInclude>
<ClCompile Include="..\..\src\core\SDL_core_unsupported.h">
<Filter>core</Filter>
</ClCompile>
<ClInclude Include="..\..\src\core\windows\SDL_directx.h">
<Filter>core\windows</Filter>
</ClInclude>
@@ -684,12 +687,15 @@
<ClInclude Include="..\..\src\video\SDL_stb_c.h">
<Filter>video</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\SDL_yuv_c.h">
<ClInclude Include="..\..\src\video\SDL_video_unsupported.h">
<Filter>video</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h">
<Filter>video</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\SDL_yuv_c.h">
<Filter>video</Filter>
</ClInclude>
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h">
<Filter>video\dummy</Filter>
</ClInclude>

View File

@@ -20,18 +20,18 @@
*/
#include "SDL_internal.h"
#include "SDL_core_unsupported.h"
#ifndef SDL_VIDEO_DRIVER_X11
SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)
{
}
#endif
#endif /* !SDL_VIDEO_DRIVER_X11 */
#ifndef SDL_PLATFORM_LINUX
SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority)
{
(void)threadID;
@@ -39,7 +39,6 @@ bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority)
return SDL_Unsupported();
}
SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy)
{
(void)threadID;
@@ -48,37 +47,32 @@ bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int s
return SDL_Unsupported();
}
#endif
#endif /* !SDL_PLATFORM_LINUX */
#ifndef SDL_PLATFORM_GDK
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
void SDL_GDKSuspendComplete(void)
{
SDL_Unsupported();
}
SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(void *outUserHandle); /* XUserHandle *outUserHandle */
bool SDL_GetGDKDefaultUser(void *outUserHandle)
bool SDL_GetGDKDefaultUser(XUserHandle *outUserHandle)
{
return SDL_Unsupported();
}
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
void SDL_GDKSuspendGPU(SDL_GPUDevice *device)
{
}
SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
void SDL_GDKResumeGPU(SDL_GPUDevice *device)
{
}
#endif
#endif /* !SDL_PLATFORM_GDK */
#if !defined(SDL_PLATFORM_WINDOWS)
SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
{
(void)name;
@@ -87,7 +81,6 @@ bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
return SDL_Unsupported();
}
SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(void *callback, void *userdata); // SDL_WindowsMessageHook callback
void SDL_SetWindowsMessageHook(void *callback, void *userdata)
{
(void)callback;
@@ -95,30 +88,26 @@ void SDL_SetWindowsMessageHook(void *callback, void *userdata)
SDL_Unsupported();
}
SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
void SDL_UnregisterApp(void)
{
SDL_Unsupported();
}
#endif
#endif /* !SDL_PLATFORM_WINDOWS */
#ifndef SDL_PLATFORM_ANDROID
SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
void SDL_SendAndroidBackButton(void)
{
SDL_Unsupported();
}
SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
void *SDL_GetAndroidActivity(void)
{
SDL_Unsupported();
return NULL;
}
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void);
const char *SDL_GetAndroidCachePath(void)
{
SDL_Unsupported();
@@ -126,35 +115,29 @@ const char *SDL_GetAndroidCachePath(void)
}
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void);
const char *SDL_GetAndroidExternalStoragePath(void)
{
SDL_Unsupported();
return NULL;
}
SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
Uint32 SDL_GetAndroidExternalStorageState(void)
{
SDL_Unsupported();
return 0;
}
SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void);
const char *SDL_GetAndroidInternalStoragePath(void)
{
SDL_Unsupported();
return NULL;
}
SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void);
void *SDL_GetAndroidJNIEnv(void)
{
SDL_Unsupported();
return NULL;
}
typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, const char *permission, bool granted);
SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);
bool SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata)
{
(void)permission;
@@ -163,7 +146,6 @@ bool SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPerm
return SDL_Unsupported();
}
SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param);
bool SDL_SendAndroidMessage(Uint32 command, int param)
{
(void)command;
@@ -171,7 +153,6 @@ bool SDL_SendAndroidMessage(Uint32 command, int param)
return SDL_Unsupported();
}
SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);
bool SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset)
{
(void)message;
@@ -182,28 +163,24 @@ bool SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xo
return SDL_Unsupported();
}
SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
int SDL_GetAndroidSDKVersion(void)
{
return SDL_Unsupported();
}
SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
bool SDL_IsChromebook(void)
{
SDL_Unsupported();
return false;
}
SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
bool SDL_IsDeXMode(void)
{
SDL_Unsupported();
return false;
}
SDL_DECLSPEC Sint32 SDLCALL JNI_OnLoad(void *vm, void *reserved);
Sint32 JNI_OnLoad(void *vm, void *reserved)
Sint32 JNI_OnLoad(JavaVM *vm, void *reserved)
{
(void)vm;
(void)reserved;

View File

@@ -0,0 +1,65 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 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.
*/
#ifndef SDL_VIDEO_DRIVER_X11
extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
#endif
#ifndef SDL_PLATFORM_LINUX
extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
extern SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
#endif
#if !defined(SDL_PLATFORM_GDK)
typedef struct XUserHandle XUserHandle;
extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(XUserHandle *outUserHandle);
extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
extern SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
#endif /* !SDL_PLATFORM_GDK */
#if !defined(SDL_PLATFORM_WINDOWS)
extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(void *callback, void *userdata);
extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* !SDL_PLATFORM_WINDOWS */
#if !defined(SDL_PLATFORM_ANDROID)
typedef void *SDL_RequestAndroidPermissionCallback;
typedef void *JavaVM;
extern SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void);
extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void);
extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
extern SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void);
extern SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void);
extern SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);
extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param);
extern SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);
extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
extern SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
extern SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
extern SDL_DECLSPEC Sint32 SDLCALL JNI_OnLoad(JavaVM *vm, void *reserved);
#endif /* !SDL_PLATFORM_ANDROID */

View File

@@ -40,6 +40,8 @@
#include <SDL3/SDL.h>
#define SDL_MAIN_NOIMPL // don't drag in header-only implementation of SDL_main
#include <SDL3/SDL_main.h>
#include "../core/SDL_core_unsupported.h"
#include "../video/SDL_video_unsupported.h"
// These headers have system specific definitions, so aren't included above

View File

@@ -33,20 +33,4 @@ typedef struct ID3D11Device ID3D11Device;
typedef struct IDirect3DDevice9 IDirect3DDevice9;
#endif
#ifndef SDL_PLATFORM_GDK
typedef struct XTaskQueueHandle XTaskQueueHandle;
#endif
#ifndef SDL_PLATFORM_GDK
typedef struct XUserHandle XUserHandle;
#endif
#ifndef SDL_PLATFORM_ANDROID
typedef void *SDL_RequestAndroidPermissionCallback;
#endif
#ifndef SDL_PLATFORM_IOS
typedef void *SDL_iOSAnimationCallback;
#endif
#endif

View File

@@ -20,6 +20,8 @@
*/
#include "SDL_internal.h"
#include "SDL_video_unsupported.h"
#ifndef SDL_VIDEO_DRIVER_WINDOWS
#if defined(SDL_PLATFORM_WINDOWS)
@@ -42,7 +44,6 @@ void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
#endif // defined(SDL_PLATFORM_WINDOWS)
SDL_DECLSPEC bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);
bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex)
{
(void)displayID;
@@ -51,7 +52,6 @@ bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outp
return SDL_Unsupported();
}
SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID)
{
(void)displayID;
@@ -61,7 +61,6 @@ int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID)
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID)
{
(void)displayID;
@@ -73,8 +72,7 @@ int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID)
#ifndef SDL_PLATFORM_GDK
SDL_DECLSPEC bool SDLCALL SDL_GetGDKTaskQueue(void *outTaskQueue);
bool SDL_GetGDKTaskQueue(void *outTaskQueue)
bool SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue)
{
(void)outTaskQueue;
return SDL_Unsupported();
@@ -82,9 +80,8 @@ bool SDL_GetGDKTaskQueue(void *outTaskQueue)
#endif
#ifndef SDL_VIDEO_DRIVER_UIKIT
#if !defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) || defined(SDL_PLATFORM_VISIONOS)
SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
void SDL_OnApplicationDidChangeStatusBarOrientation(void)
{
SDL_Unsupported();
@@ -95,7 +92,6 @@ void SDL_OnApplicationDidChangeStatusBarOrientation(void)
#ifndef SDL_VIDEO_DRIVER_UIKIT
typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata);
SDL_DECLSPEC bool SDLCALL SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam);
bool SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam)
{
(void)window;
@@ -105,7 +101,6 @@ bool SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimat
return SDL_Unsupported();
}
SDL_DECLSPEC void SDLCALL SDL_SetiOSEventPump(bool enabled);
void SDL_SetiOSEventPump(bool enabled)
{
(void)enabled;

View File

@@ -0,0 +1,61 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 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.
*/
#if !defined(SDL_VIDEO_DRIVER_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS)
extern SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
#endif /* SDL_PLATFORM_WINDOWS */
extern SDL_DECLSPEC bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);
extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
#endif /* !SDL_VIDEO_DRIVER_WINDOWS */
#if !defined(SDL_PLATFORM_GDK)
typedef struct XTaskQueueHandle XTaskQueueHandle;
extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue);
#endif /* !SDL_PLATFORM_GDK */
#if !defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) || defined(SDL_PLATFORM_VISIONOS)
extern SDL_DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
#endif
#if !defined(SDL_VIDEO_DRIVER_UIKIT)
typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata);
extern SDL_DECLSPEC bool SDLCALL SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam);
extern SDL_DECLSPEC void SDLCALL SDL_SetiOSEventPump(bool enabled);
#endif