mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 10:48:28 +00:00
Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
Allows users to disable them by defining them as 0. Closes https://github.com/libsdl-org/SDL/issues/8996 (manual port of https://github.com/libsdl-org/SDL/pull/9063 to SDL3.0)
This commit is contained in:
parent
8ddddd36cd
commit
aae2d22852
37 changed files with 122 additions and 80 deletions
|
@ -194,6 +194,58 @@
|
||||||
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
|
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_RENDER_DISABLED
|
||||||
|
/* define the not defined ones as 0 */
|
||||||
|
#ifndef SDL_VIDEO_RENDER_D3D
|
||||||
|
#define SDL_VIDEO_RENDER_D3D 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||||
|
#define SDL_VIDEO_RENDER_D3D11 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_D3D12
|
||||||
|
#define SDL_VIDEO_RENDER_D3D12 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_METAL
|
||||||
|
#define SDL_VIDEO_RENDER_METAL 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_OGL
|
||||||
|
#define SDL_VIDEO_RENDER_OGL 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_PS2
|
||||||
|
#define SDL_VIDEO_RENDER_PS2 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_PSP
|
||||||
|
#define SDL_VIDEO_RENDER_PSP 0
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_VITA_GXM
|
||||||
|
#define SDL_VIDEO_RENDER_VITA_GXM 0
|
||||||
|
#endif
|
||||||
|
#else /* define all as 0 */
|
||||||
|
#undef SDL_VIDEO_RENDER_SW
|
||||||
|
#define SDL_VIDEO_RENDER_SW 0
|
||||||
|
#undef SDL_VIDEO_RENDER_D3D
|
||||||
|
#define SDL_VIDEO_RENDER_D3D 0
|
||||||
|
#undef SDL_VIDEO_RENDER_D3D11
|
||||||
|
#define SDL_VIDEO_RENDER_D3D11 0
|
||||||
|
#undef SDL_VIDEO_RENDER_D3D12
|
||||||
|
#define SDL_VIDEO_RENDER_D3D12 0
|
||||||
|
#undef SDL_VIDEO_RENDER_METAL
|
||||||
|
#define SDL_VIDEO_RENDER_METAL 0
|
||||||
|
#undef SDL_VIDEO_RENDER_OGL
|
||||||
|
#define SDL_VIDEO_RENDER_OGL 0
|
||||||
|
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 0
|
||||||
|
#undef SDL_VIDEO_RENDER_PS2
|
||||||
|
#define SDL_VIDEO_RENDER_PS2 0
|
||||||
|
#undef SDL_VIDEO_RENDER_PSP
|
||||||
|
#define SDL_VIDEO_RENDER_PSP 0
|
||||||
|
#undef SDL_VIDEO_RENDER_VITA_GXM
|
||||||
|
#define SDL_VIDEO_RENDER_VITA_GXM 0
|
||||||
|
#endif /* SDL_RENDER_DISABLED */
|
||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <SDL3/SDL_intrin.h>
|
#include <SDL3/SDL_intrin.h>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
#undef WINVER
|
#undef WINVER
|
||||||
#undef _WIN32_WINNT
|
#undef _WIN32_WINNT
|
||||||
#ifdef SDL_VIDEO_RENDER_D3D12
|
#if SDL_VIDEO_RENDER_D3D12
|
||||||
#define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */
|
#define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */
|
||||||
#elif defined(HAVE_SHELLSCALINGAPI_H)
|
#elif defined(HAVE_SHELLSCALINGAPI_H)
|
||||||
#define _WIN32_WINNT 0x603 /* For DPI support */
|
#define _WIN32_WINNT 0x603 /* For DPI support */
|
||||||
|
@ -93,16 +93,6 @@
|
||||||
#include <basetyps.h> /* for REFIID with broken mingw.org headers */
|
#include <basetyps.h> /* for REFIID with broken mingw.org headers */
|
||||||
#include <mmreg.h>
|
#include <mmreg.h>
|
||||||
|
|
||||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
|
||||||
#ifndef DWORD_PTR
|
|
||||||
#define DWORD_PTR DWORD
|
|
||||||
#endif
|
|
||||||
#ifndef LONG_PTR
|
|
||||||
#define LONG_PTR LONG
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Routines to convert from UTF8 to native Windows text */
|
/* Routines to convert from UTF8 to native Windows text */
|
||||||
#define WIN_StringToUTF8W(S) SDL_iconv_string("UTF-8", "UTF-16LE", (const char *)(S), (SDL_wcslen(S) + 1) * sizeof(WCHAR))
|
#define WIN_StringToUTF8W(S) SDL_iconv_string("UTF-8", "UTF-16LE", (const char *)(S), (SDL_wcslen(S) + 1) * sizeof(WCHAR))
|
||||||
#define WIN_UTF8ToStringW(S) (WCHAR *)SDL_iconv_string("UTF-16LE", "UTF-8", (const char *)(S), SDL_strlen(S) + 1)
|
#define WIN_UTF8ToStringW(S) (WCHAR *)SDL_iconv_string("UTF-16LE", "UTF-8", (const char *)(S), SDL_strlen(S) + 1)
|
||||||
|
|
|
@ -53,7 +53,7 @@ extern "C" {
|
||||||
#include "SDL_winrtapp_common.h"
|
#include "SDL_winrtapp_common.h"
|
||||||
#include "SDL_winrtapp_direct3d.h"
|
#include "SDL_winrtapp_direct3d.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
|
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
|
||||||
* when Windows 8.1 apps are about to get suspended.
|
* when Windows 8.1 apps are about to get suspended.
|
||||||
*/
|
*/
|
||||||
|
@ -609,7 +609,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^
|
||||||
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
|
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
|
||||||
// This is necessary for Windows 8.1, possibly elsewhere in the future.
|
// This is necessary for Windows 8.1, possibly elsewhere in the future.
|
||||||
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
|
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
if (WINRT_GlobalSDLWindow) {
|
if (WINRT_GlobalSDLWindow) {
|
||||||
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
|
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
|
||||||
if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) {
|
if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || defined(SDL_VIDEO_RENDER_D3D12)) && !defined(SDL_RENDER_DISABLED)
|
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12)
|
||||||
|
|
||||||
#include "SDL_d3dmath.h"
|
#include "SDL_d3dmath.h"
|
||||||
|
|
||||||
|
@ -129,4 +129,4 @@ Float4X4 MatrixRotationZ(float r)
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) && !defined(SDL_RENDER_DISABLED) */
|
#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || defined(SDL_VIDEO_RENDER_D3D12)) && !defined(SDL_RENDER_DISABLED)
|
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12)
|
||||||
|
|
||||||
/* Set up for C function definitions, even when using C++ */
|
/* Set up for C function definitions, even when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -78,4 +78,4 @@ Float4X4 MatrixRotationZ(float r);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) && !defined(SDL_RENDER_DISABLED) */
|
#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) */
|
||||||
|
|
|
@ -89,31 +89,31 @@ this should probably be removed at some point in the future. --ryan. */
|
||||||
|
|
||||||
#ifndef SDL_RENDER_DISABLED
|
#ifndef SDL_RENDER_DISABLED
|
||||||
static const SDL_RenderDriver *render_drivers[] = {
|
static const SDL_RenderDriver *render_drivers[] = {
|
||||||
#ifdef SDL_VIDEO_RENDER_D3D12
|
#if SDL_VIDEO_RENDER_D3D12
|
||||||
&D3D12_RenderDriver,
|
&D3D12_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_D3D11
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
&D3D11_RenderDriver,
|
&D3D11_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_D3D
|
#if SDL_VIDEO_RENDER_D3D
|
||||||
&D3D_RenderDriver,
|
&D3D_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_METAL
|
#if SDL_VIDEO_RENDER_METAL
|
||||||
&METAL_RenderDriver,
|
&METAL_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_OGL
|
#if SDL_VIDEO_RENDER_OGL
|
||||||
&GL_RenderDriver,
|
&GL_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_OGL_ES2
|
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||||
&GLES2_RenderDriver,
|
&GLES2_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_PS2
|
#if SDL_VIDEO_RENDER_PS2
|
||||||
&PS2_RenderDriver,
|
&PS2_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_PSP
|
#if SDL_VIDEO_RENDER_PSP
|
||||||
&PSP_RenderDriver,
|
&PSP_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
&VITA_GXM_RenderDriver,
|
&VITA_GXM_RenderDriver,
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_RENDER_SW
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
@ -1056,7 +1056,7 @@ SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, const char *name, Uint32 fl
|
||||||
|
|
||||||
SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)
|
SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)
|
||||||
{
|
{
|
||||||
#if !defined(SDL_RENDER_DISABLED) && SDL_VIDEO_RENDER_SW
|
#if SDL_VIDEO_RENDER_SW
|
||||||
SDL_Renderer *renderer;
|
SDL_Renderer *renderer;
|
||||||
|
|
||||||
renderer = SW_CreateRendererForSurface(surface);
|
renderer = SW_CreateRendererForSurface(surface);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D
|
||||||
|
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
#include "../../video/windows/SDL_windowsvideo.h"
|
#include "../../video/windows/SDL_windowsvideo.h"
|
||||||
#include "../../video/SDL_pixels_c.h"
|
#include "../../video/SDL_pixels_c.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_D3D
|
#if SDL_VIDEO_RENDER_D3D
|
||||||
#define D3D_DEBUG_INFO
|
#define D3D_DEBUG_INFO
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D
|
||||||
|
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ HRESULT D3D9_CreatePixelShader(IDirect3DDevice9 *d3dDevice, D3D9_Shader shader,
|
||||||
return IDirect3DDevice9_CreatePixelShader(d3dDevice, (const DWORD *)D3D9_shaders[shader], pixelShader);
|
return IDirect3DDevice9_CreatePixelShader(d3dDevice, (const DWORD *)D3D9_shaders[shader], pixelShader);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_D3D */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
|
|
||||||
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
|
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -90,4 +90,4 @@ D3D11_GetCurrentRotation()
|
||||||
return DXGI_MODE_ROTATION_IDENTITY;
|
return DXGI_MODE_ROTATION_IDENTITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_D3D11 */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -33,4 +33,4 @@ DXGI_MODE_ROTATION D3D11_GetCurrentRotation();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_D3D11 */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D11
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
@ -130,4 +130,4 @@ int D3D11_CreatePixelShader(ID3D11Device1 *d3dDevice, D3D11_Shader shader, ID3D1
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_D3D11 */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D12) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_D3D12
|
||||||
|
|
||||||
#define SDL_D3D12_NUM_BUFFERS 2
|
#define SDL_D3D12_NUM_BUFFERS 2
|
||||||
#define SDL_D3D12_NUM_VERTEX_BUFFERS 256
|
#define SDL_D3D12_NUM_VERTEX_BUFFERS 256
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../SDL_internal.h"
|
#include "../../SDL_internal.h"
|
||||||
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
#if SDL_VIDEO_RENDER_D3D12 && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
#include "SDL_render_d3d12_xbox.h"
|
#include "SDL_render_d3d12_xbox.h"
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
#include <XGameRuntime.h>
|
#include <XGameRuntime.h>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_D3D12) && !defined(SDL_RENDER_DISABLED) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
#if SDL_VIDEO_RENDER_D3D12 && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||||
|
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
#include <d3d12.h>
|
#include <d3d12.h>
|
||||||
|
@ -156,4 +156,4 @@ void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECO
|
||||||
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) */
|
#endif /* SDL_VIDEO_RENDER_D3D12 && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "../../SDL_internal.h"
|
#include "../../SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(SDL_PLATFORM_XBOXONE)
|
#if SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXONE)
|
||||||
|
|
||||||
#include <SDL3/SDL_stdinc.h>
|
#include <SDL3/SDL_stdinc.h>
|
||||||
|
|
||||||
|
@ -139,6 +139,6 @@ D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE *o
|
||||||
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(SDL_PLATFORM_XBOXONE) */
|
#endif /* SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXONE) */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "../../SDL_internal.h"
|
#include "../../SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(SDL_PLATFORM_XBOXSERIES)
|
#if SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXSERIES)
|
||||||
|
|
||||||
#include <SDL3/SDL_stdinc.h>
|
#include <SDL3/SDL_stdinc.h>
|
||||||
|
|
||||||
|
@ -139,6 +139,6 @@ D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE *o
|
||||||
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(SDL_PLATFORM_XBOXSERIES) */
|
#endif /* SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXSERIES) */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_METAL) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_METAL
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
#include "../../video/SDL_pixels_c.h"
|
#include "../../video/SDL_pixels_c.h"
|
||||||
|
@ -2170,4 +2170,4 @@ SDL_RenderDriver METAL_RenderDriver = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_METAL && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_METAL */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_OGL) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_OGL
|
||||||
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
||||||
#include <SDL3/SDL_opengl.h>
|
#include <SDL3/SDL_opengl.h>
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
|
@ -1934,4 +1934,4 @@ SDL_RenderDriver GL_RenderDriver = {
|
||||||
0 }
|
0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_OGL */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_OGL) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_OGL
|
||||||
|
|
||||||
#include <SDL3/SDL_opengl.h>
|
#include <SDL3/SDL_opengl.h>
|
||||||
#include "SDL_shaders_gl.h"
|
#include "SDL_shaders_gl.h"
|
||||||
|
@ -543,4 +543,4 @@ void GL_DestroyShaderContext(GL_ShaderContext *ctx)
|
||||||
SDL_free(ctx);
|
SDL_free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_OGL */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_OGL_ES2) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
|
||||||
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
||||||
#include <SDL3/SDL_opengles2.h>
|
#include <SDL3/SDL_opengles2.h>
|
||||||
|
@ -2271,4 +2271,4 @@ SDL_RenderDriver GLES2_RenderDriver = {
|
||||||
0 }
|
0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !defined(SDL_RENDER_DISABLED) */
|
#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_RENDER_OGL_ES2) && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
|
||||||
#include <SDL3/SDL_opengles2.h>
|
#include <SDL3/SDL_opengles2.h>
|
||||||
#include "SDL_shaders_gles2.h"
|
#include "SDL_shaders_gles2.h"
|
||||||
|
@ -384,4 +384,4 @@ const char *GLES2_GetShader(GLES2_ShaderType type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#ifndef SDL_shaders_gles2_h_
|
#ifndef SDL_shaders_gles2_h_
|
||||||
#define SDL_shaders_gles2_h_
|
#define SDL_shaders_gles2_h_
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_OGL_ES2
|
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_PS2
|
#if SDL_VIDEO_RENDER_PS2
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_PSP
|
#if SDL_VIDEO_RENDER_PSP
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "SDL_draw.h"
|
#include "SDL_draw.h"
|
||||||
#include "SDL_blendfillrect.h"
|
#include "SDL_blendfillrect.h"
|
||||||
|
@ -343,4 +343,4 @@ int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "SDL_draw.h"
|
#include "SDL_draw.h"
|
||||||
#include "SDL_blendline.h"
|
#include "SDL_blendline.h"
|
||||||
|
@ -859,4 +859,4 @@ int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "SDL_draw.h"
|
#include "SDL_draw.h"
|
||||||
#include "SDL_blendpoint.h"
|
#include "SDL_blendpoint.h"
|
||||||
|
@ -348,4 +348,4 @@ int SDL_BlendPoints(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "SDL_draw.h"
|
#include "SDL_draw.h"
|
||||||
#include "SDL_drawline.h"
|
#include "SDL_drawline.h"
|
||||||
|
@ -197,4 +197,4 @@ int SDL_DrawLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "SDL_draw.h"
|
#include "SDL_draw.h"
|
||||||
#include "SDL_drawpoint.h"
|
#include "SDL_drawpoint.h"
|
||||||
|
@ -106,4 +106,4 @@ int SDL_DrawPoints(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
#include "SDL_render_sw_c.h"
|
#include "SDL_render_sw_c.h"
|
||||||
|
@ -1239,4 +1239,4 @@ SDL_RenderDriver SW_RenderDriver = {
|
||||||
0 }
|
0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -30,7 +30,7 @@ Andreas Schiffler -- aschiffler at ferzkopp dot net
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
@ -613,4 +613,4 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
|
||||||
return rz_dst;
|
return rz_dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#if SDL_VIDEO_RENDER_SW && !defined(SDL_RENDER_DISABLED)
|
#if SDL_VIDEO_RENDER_SW
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
@ -934,4 +934,4 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
|
||||||
TRIANGLE_END_LOOP
|
TRIANGLE_END_LOOP
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED */
|
#endif /* SDL_VIDEO_RENDER_SW */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
|
|
||||||
#include "SDL_render_vita_gxm_memory.h"
|
#include "SDL_render_vita_gxm_memory.h"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_internal.h"
|
#include "SDL_internal.h"
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
|
|
||||||
#include "../SDL_sysrender.h"
|
#include "../SDL_sysrender.h"
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
#include "SDL_vitamessagebox.h"
|
#include "SDL_vitamessagebox.h"
|
||||||
#include <psp2/message_dialog.h>
|
#include <psp2/message_dialog.h>
|
||||||
|
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
#include "../../render/vitagxm/SDL_render_vita_gxm_tools.h"
|
#include "../../render/vitagxm/SDL_render_vita_gxm_tools.h"
|
||||||
#endif /* SDL_VIDEO_RENDER_VITA_GXM */
|
#endif /* SDL_VIDEO_RENDER_VITA_GXM */
|
||||||
|
|
||||||
int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
|
int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
|
||||||
{
|
{
|
||||||
#ifdef SDL_VIDEO_RENDER_VITA_GXM
|
#if SDL_VIDEO_RENDER_VITA_GXM
|
||||||
SceMsgDialogParam param;
|
SceMsgDialogParam param;
|
||||||
SceMsgDialogUserMessageParam msgParam;
|
SceMsgDialogUserMessageParam msgParam;
|
||||||
SceMsgDialogButtonsParam buttonParam;
|
SceMsgDialogButtonsParam buttonParam;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue