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:
Ozkan Sezer
2024-02-15 20:55:02 +03:00
parent 8ddddd36cd
commit aae2d22852
37 changed files with 122 additions and 80 deletions

View File

@@ -20,7 +20,7 @@
*/
#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"
@@ -129,4 +129,4 @@ Float4X4 MatrixRotationZ(float r)
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) */