SDL: d3d12: xbox has no DXGI_PRESENT flags

From 54c435409bdb2dbd40e194104581bd564c3d2086 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 24 May 2024 19:36:20 +0200
Subject: [PATCH] d3d12: xbox has no DXGI_PRESENT flags

---
 src/render/direct3d12/SDL_render_d3d12.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c
index 04c065ccf5f08..9b097f0f825e4 100644
--- a/src/render/direct3d12/SDL_render_d3d12.c
+++ b/src/render/direct3d12/SDL_render_d3d12.c
@@ -58,6 +58,11 @@
 #define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
 #endif
 
+/* DXGI_PRESENT flags are removed on Xbox */
+#if defined(__XBOXONE__) || defined(__XBOXSERIES__)
+#define DXGI_PRESENT_ALLOW_TEARING 0
+#endif
+
 #ifdef __cplusplus
 #define SAFE_RELEASE(X) \
     if (X) {            \