From b798e49c9296e7bb7fa0d76949cba8b997a2947c Mon Sep 17 00:00:00 2001
From: Cameron Cawley <[EMAIL REDACTED]>
Date: Thu, 19 May 2022 21:44:38 +0100
Subject: [PATCH] Fix build warning with MSVC
---
src/video/windows/SDL_windowsvideo.c | 32 ++++++++++++++--------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c
index 93a6bfa8151..62ad1c96450 100644
--- a/src/video/windows/SDL_windowsvideo.c
+++ b/src/video/windows/SDL_windowsvideo.c
@@ -35,22 +35,6 @@
#include "SDL_windowsshape.h"
#include "SDL_windowsvulkan.h"
-#ifdef D3D_DEBUG_INFO
-#ifndef D3D_SDK_VERSION
-#define D3D_SDK_VERSION (32 | 0x80000000)
-#endif
-#ifndef D3D9b_SDK_VERSION
-#define D3D9b_SDK_VERSION (31 | 0x80000000)
-#endif
-#else /**/
-#ifndef D3D_SDK_VERSION
-#define D3D_SDK_VERSION 32
-#endif
-#ifndef D3D9b_SDK_VERSION
-#define D3D9b_SDK_VERSION 31
-#endif
-#endif
-
/* Initialization/Query functions */
static int WIN_VideoInit(_THIS);
static void WIN_VideoQuit(_THIS);
@@ -281,6 +265,22 @@ WIN_VideoQuit(_THIS)
#define D3D_DEBUG_INFO
#include <d3d9.h>
+#ifdef D3D_DEBUG_INFO
+#ifndef D3D_SDK_VERSION
+#define D3D_SDK_VERSION (32 | 0x80000000)
+#endif
+#ifndef D3D9b_SDK_VERSION
+#define D3D9b_SDK_VERSION (31 | 0x80000000)
+#endif
+#else /**/
+#ifndef D3D_SDK_VERSION
+#define D3D_SDK_VERSION 32
+#endif
+#ifndef D3D9b_SDK_VERSION
+#define D3D9b_SDK_VERSION 31
+#endif
+#endif
+
SDL_bool
D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
{