mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-26 10:41:06 +01:00
Fix -Wundef warnings due to use of unguarded SDL_VIDEO_RENDER_D3D11
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user