Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D12

This commit is contained in:
Anonymous Maarten
2023-03-27 15:54:54 +02:00
parent 0abbeec741
commit 63fa1bae3e
9 changed files with 10 additions and 10 deletions

View File

@@ -205,7 +205,7 @@
#define SDL_VIDEO_RENDER_D3D11 1
/* Disable D3D12 as it's not implemented for WinRT */
#define SDL_VIDEO_RENDER_D3D12 0
/* #undef SDL_VIDEO_RENDER_D3D12 */
#if SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || defined(SDL_VIDEO_RENDER_D3D12)) && !SDL_RENDER_DISABLED
#include "SDL_d3dmath.h"

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED
#if (defined(SDL_VIDEO_RENDER_D3D) || defined(SDL_VIDEO_RENDER_D3D11) || defined(SDL_VIDEO_RENDER_D3D12)) && !SDL_RENDER_DISABLED
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus

View File

@@ -89,7 +89,7 @@ this should probably be removed at some point in the future. --ryan. */
#if !SDL_RENDER_DISABLED
static const SDL_RenderDriver *render_drivers[] = {
#if SDL_VIDEO_RENDER_D3D12
#ifdef SDL_VIDEO_RENDER_D3D12
&D3D12_RenderDriver,
#endif
#ifdef SDL_VIDEO_RENDER_D3D11

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED
#define SDL_D3D12_NUM_BUFFERS 2
#define SDL_D3D12_NUM_VERTEX_BUFFERS 256
@@ -3050,7 +3050,7 @@ extern "C"
{
ID3D12Device *device = NULL;
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED
D3D12_RenderData *data = (D3D12_RenderData *)renderer->driverdata;
/* Make sure that this is a D3D renderer */

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && (defined(__XBOXONE__) || defined(__XBOXSERIES__))
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED && (defined(__XBOXONE__) || defined(__XBOXSERIES__))
#include "SDL_render_d3d12_xbox.h"
#error "This is a placeholder Xbox file, as the real one is under NDA. See README-gdk.md for more info."

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED && !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
#include "../../core/windows/SDL_windows.h"
#include <d3d12.h>

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(__XBOXONE__)
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED && defined(__XBOXONE__)
#error "This is a placeholder Xbox file, as the real one is under NDA. See README-gdk.md for more info."

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED && defined(__XBOXSERIES__)
#if defined(SDL_VIDEO_RENDER_D3D12) && !SDL_RENDER_DISABLED && defined(__XBOXSERIES__)
#error "This is a placeholder Xbox file, as the real one is under NDA. See README-gdk.md for more info."