Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D11

This commit is contained in:
Anonymous Maarten
2023-03-27 15:53:40 +02:00
parent b2e2af811b
commit 0abbeec741
8 changed files with 10 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ extern "C" {
#include "SDL_winrtapp_common.h"
#include "SDL_winrtapp_direct3d.h"
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
* when Windows 8.1 apps are about to get suspended.
*/
@@ -618,7 +618,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
// 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
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
if (WINRT_GlobalSDLWindow) {
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) {

View File

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

View File

@@ -92,7 +92,7 @@ static const SDL_RenderDriver *render_drivers[] = {
#if SDL_VIDEO_RENDER_D3D12
&D3D12_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
&D3D11_RenderDriver,
#endif
#ifdef SDL_VIDEO_RENDER_D3D

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
#define COBJMACROS
#include "../../core/windows/SDL_windows.h"
@@ -2407,7 +2407,7 @@ SDL_GetRenderD3D11Device(SDL_Renderer *renderer)
{
ID3D11Device *device = NULL;
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
D3D11_RenderData *data = (D3D11_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_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
extern "C" {

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
#ifdef __cplusplus
extern "C" {

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#if defined(SDL_VIDEO_RENDER_D3D11) && !SDL_RENDER_DISABLED
#define COBJMACROS
#include "../../core/windows/SDL_windows.h"