From ac08dde1b224d8fb84cc31c88b4a175ddb223044 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 5 Sep 2024 23:59:23 -0400
Subject: [PATCH] windows: Clean out things that should be using
`defined(SDL_PLATFORM_WINDOWS)`.
---
include/SDL3/SDL_begin_code.h | 4 ++--
include/SDL3/SDL_main.h | 6 +++---
include/SDL3/SDL_main_impl.h | 4 ++--
include/SDL3/SDL_stdinc.h | 8 ++++----
include/SDL3/SDL_system.h | 9 +++------
include/SDL3/SDL_thread.h | 4 ++--
src/SDL.c | 6 +++---
src/SDL_assert.c | 6 +++---
src/SDL_log.c | 4 ++--
src/atomic/SDL_spinlock.c | 2 +-
src/core/SDL_core_unsupported.c | 2 +-
src/core/windows/SDL_immdevice.c | 4 ++--
src/core/windows/SDL_windows.c | 4 ++--
src/cpuinfo/SDL_cpuinfo.c | 6 +++---
src/dynapi/SDL_dynapi_unsupported.h | 2 +-
src/events/SDL_mouse.c | 2 +-
src/file/SDL_iostream.c | 12 ++++++------
src/render/direct3d11/SDL_render_d3d11.c | 4 ----
src/render/software/SDL_rotate.c | 2 +-
src/stdlib/SDL_iconv.c | 2 +-
src/thread/SDL_thread.c | 2 +-
src/video/SDL_video.c | 2 +-
src/video/SDL_video_unsupported.c | 4 ++--
23 files changed, 47 insertions(+), 54 deletions(-)
diff --git a/include/SDL3/SDL_begin_code.h b/include/SDL3/SDL_begin_code.h
index 2a38fc04b06f4..f58baab38d503 100644
--- a/include/SDL3/SDL_begin_code.h
+++ b/include/SDL3/SDL_begin_code.h
@@ -53,7 +53,7 @@
/* Some compilers use a special export keyword */
#ifndef SDL_DECLSPEC
-# if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_CYGWIN) || defined(SDL_PLATFORM_GDK)
+# if defined(SDL_PLATFORM_WINDOWS)
# ifdef DLL_EXPORT
# define SDL_DECLSPEC __declspec(dllexport)
# else
@@ -70,7 +70,7 @@
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
-#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && !defined(__GNUC__)
+#if defined(SDL_PLATFORM_WINDOWS) && !defined(__GNUC__)
#define SDLCALL __cdecl
#else
#define SDLCALL
diff --git a/include/SDL3/SDL_main.h b/include/SDL3/SDL_main.h
index a5a877bf589cb..82e60510ccd58 100644
--- a/include/SDL3/SDL_main.h
+++ b/include/SDL3/SDL_main.h
@@ -503,7 +503,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RunApp(int argc, char *argv[], SDL_main_func
extern SDL_DECLSPEC int SDLCALL SDL_EnterAppMainCallbacks(int argc, char *argv[], SDL_AppInit_func appinit, SDL_AppIterate_func appiter, SDL_AppEvent_func appevent, SDL_AppQuit_func appquit);
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
/**
* Register a win32 window class for SDL's use.
@@ -548,7 +548,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_RegisterApp(const char *name, Uint32 st
*/
extern SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
-#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) */
+#endif /* defined(SDL_PLATFORM_WINDOWS) */
#ifdef SDL_PLATFORM_GDK
@@ -570,7 +570,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
#if !defined(SDL_MAIN_HANDLED) && !defined(SDL_MAIN_NOIMPL)
/* include header-only SDL_main implementations */
#if defined(SDL_MAIN_USE_CALLBACKS) \
- || defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) \
+ || defined(SDL_PLATFORM_WINDOWS) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS) \
|| defined(SDL_PLATFORM_3DS) || defined(SDL_PLATFORM_NGAGE) || defined(SDL_PLATFORM_PS2) || defined(SDL_PLATFORM_PSP) \
|| defined(SDL_PLATFORM_EMSCRIPTEN)
diff --git a/include/SDL3/SDL_main_impl.h b/include/SDL3/SDL_main_impl.h
index d46518c07d18b..feca572bcefb2 100644
--- a/include/SDL3/SDL_main_impl.h
+++ b/include/SDL3/SDL_main_impl.h
@@ -67,7 +67,7 @@
/* set up the usual SDL_main stuff if we're not using callbacks or if we are but need the normal entry point. */
#if !defined(SDL_MAIN_USE_CALLBACKS) || defined(SDL_MAIN_CALLBACK_STANDARD)
- #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+ #if defined(SDL_PLATFORM_WINDOWS)
/* these defines/typedefs are needed for the WinMain() definition */
#ifndef WINAPI
@@ -124,7 +124,7 @@
} /* extern "C" */
#endif
- /* end of SDL_PLATFORM_WIN32 and SDL_PLATFORM_GDK impls */
+ /* end of SDL_PLATFORM_WINDOWS impls */
#elif defined(SDL_PLATFORM_NGAGE)
/* same typedef as in ngage SDKs e32def.h */
diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index 511c9caa3a0a7..7d4c5cbd52b63 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -336,7 +336,7 @@ typedef Sint64 SDL_Time;
* <stdint.h> should define these but this is not true all platforms.
* (for example win32) */
#ifndef SDL_PRIs64
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#define SDL_PRIs64 "I64d"
#elif defined(PRIs64)
#define SDL_PRIs64 PRIs64
@@ -347,7 +347,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIu64
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#define SDL_PRIu64 "I64u"
#elif defined(PRIu64)
#define SDL_PRIu64 PRIu64
@@ -358,7 +358,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIx64
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#define SDL_PRIx64 "I64x"
#elif defined(PRIx64)
#define SDL_PRIx64 PRIx64
@@ -369,7 +369,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIX64
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#define SDL_PRIX64 "I64X"
#elif defined(PRIX64)
#define SDL_PRIX64 PRIX64
diff --git a/include/SDL3/SDL_system.h b/include/SDL3/SDL_system.h
index 789da28469397..e3aa8c0c3ddf9 100644
--- a/include/SDL3/SDL_system.h
+++ b/include/SDL3/SDL_system.h
@@ -44,7 +44,7 @@ extern "C" {
/*
* Platform specific functions for Windows
*/
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
typedef struct tagMSG MSG;
@@ -90,7 +90,7 @@ typedef SDL_bool (SDLCALL *SDL_WindowsMessageHook)(void *userdata, MSG *msg);
*/
extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
-#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) */
+#endif /* defined(SDL_PLATFORM_WINDOWS) */
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
@@ -108,10 +108,6 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHoo
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
-#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) */
-
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
-
/**
* Get the DXGI Adapter and Output indices for the specified display.
*
@@ -131,6 +127,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID display
#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) */
+
/*
* Platform specific functions for UNIX
*/
diff --git a/include/SDL3/SDL_thread.h b/include/SDL3/SDL_thread.h
index 4a613efbf0cc5..a205650ce5ac8 100644
--- a/include/SDL3/SDL_thread.h
+++ b/include/SDL3/SDL_thread.h
@@ -36,7 +36,7 @@
#include <SDL3/SDL_atomic.h>
#include <SDL3/SDL_mutex.h>
-#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
+#if defined(SDL_PLATFORM_WINDOWS)
#include <process.h> /* _beginthreadex() and _endthreadex() */
#endif
@@ -263,7 +263,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop
/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
#ifndef SDL_WIKI_DOCUMENTATION_SECTION
-# if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
+# if defined(SDL_PLATFORM_WINDOWS)
# ifndef SDL_BeginThreadFunction
# define SDL_BeginThreadFunction _beginthreadex
# endif
diff --git a/src/SDL.c b/src/SDL.c
index 85308b2d20ffd..e66fc34adf430 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -21,7 +21,7 @@
#include "SDL_internal.h"
#include "SDL3/SDL_revision.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "core/windows/SDL_windows.h"
#else
#include <unistd.h> // _exit(), etc.
@@ -86,7 +86,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_MICRO_VERSION_max, SDL_MICRO_VERSION <= 999);
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
SDL_NORETURN void SDL_ExitProcess(int exitcode)
{
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
/* "if you do not know the state of all threads in your process, it is
better to call TerminateProcess than ExitProcess"
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
@@ -752,4 +752,4 @@ BOOL APIENTRY MINGW32_FORCEALIGN _DllMainCRTStartup(HANDLE hModule, DWORD ul_rea
}
#endif // Building DLL
-#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#endif // defined(SDL_PLATFORM_WIN32)
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index 986f08ee05141..c60737f24326b 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -20,14 +20,14 @@
*/
#include "SDL_internal.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "core/windows/SDL_windows.h"
#endif
#include "SDL_assert_c.h"
#include "video/SDL_sysvideo.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#ifndef WS_OVERLAPPEDWINDOW
#define WS_OVERLAPPEDWINDOW 0
#endif
@@ -86,7 +86,7 @@ static void SDL_AddAssertionToReport(SDL_AssertData *data)
}
}
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#define ENDLINE "\r\n"
#else
#define ENDLINE "\n"
diff --git a/src/SDL_log.c b/src/SDL_log.c
index 016175ecb7fee..04e8923101d2a 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "core/windows/SDL_windows.h"
#endif
@@ -526,7 +526,7 @@ static HANDLE stderrHandle = NULL;
static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
const char *message)
{
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
// Way too many allocations here, urgh
// Note: One can't call SDL_SetError here, since that function itself logs.
{
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index 6186443daef49..4a44ad47d4ba4 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "../core/windows/SDL_windows.h"
#endif
diff --git a/src/core/SDL_core_unsupported.c b/src/core/SDL_core_unsupported.c
index 81681502b94a2..02b09f5694180 100644
--- a/src/core/SDL_core_unsupported.c
+++ b/src/core/SDL_core_unsupported.c
@@ -76,7 +76,7 @@ void SDL_GDKResumeGPU(SDL_GPUDevice *device)
#endif
-#if !(defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
+#if !defined(SDL_PLATFORM_WINDOWS)
SDL_DECLSPEC SDL_bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
SDL_bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
diff --git a/src/core/windows/SDL_immdevice.c b/src/core/windows/SDL_immdevice.c
index 54f12946f8220..b46bef25ddaaf 100644
--- a/src/core/windows/SDL_immdevice.c
+++ b/src/core/windows/SDL_immdevice.c
@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
-#if (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && defined(HAVE_MMDEVICEAPI_H)
+#if defined(SDL_PLATFORM_WINDOWS) && defined(HAVE_MMDEVICEAPI_H)
#include "SDL_windows.h"
#include "SDL_immdevice.h"
@@ -431,4 +431,4 @@ void SDL_IMMDevice_EnumerateEndpoints(SDL_AudioDevice **default_playback, SDL_Au
IMMDeviceEnumerator_RegisterEndpointNotificationCallback(enumerator, (IMMNotificationClient *)¬ification_client);
}
-#endif // (defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)) && defined(HAVE_MMDEVICEAPI_H)
+#endif // defined(SDL_PLATFORM_WINDOWS) && defined(HAVE_MMDEVICEAPI_H)
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c
index cc3c52959f28c..2bc52204fb868 100644
--- a/src/core/windows/SDL_windows.c
+++ b/src/core/windows/SDL_windows.c
@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "SDL_windows.h"
@@ -372,4 +372,4 @@ int WIN_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr,
return WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpDefaultChar, lpUsedDefaultChar);
}
-#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#endif // defined(SDL_PLATFORM_WINDOWS)
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 9d7fc89881f61..d87e3f3d6f6fb 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -23,7 +23,7 @@
#include "SDL_cpuinfo_c.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "../core/windows/SDL_windows.h"
#endif
@@ -636,7 +636,7 @@ int SDL_GetCPUCount(void)
sysctlbyname("hw.ncpu", &SDL_CPUCount, &size, NULL, 0);
}
#endif
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
if (SDL_CPUCount <= 0) {
SYSTEM_INFO info;
GetSystemInfo(&info);
@@ -1138,7 +1138,7 @@ int SDL_GetSystemRAM(void)
}
}
#endif
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
if (SDL_SystemRAM <= 0) {
MEMORYSTATUSEX stat;
stat.dwLength = sizeof(stat);
diff --git a/src/dynapi/SDL_dynapi_unsupported.h b/src/dynapi/SDL_dynapi_unsupported.h
index 2402eaabb8a88..780e6d6b68c0a 100644
--- a/src/dynapi/SDL_dynapi_unsupported.h
+++ b/src/dynapi/SDL_dynapi_unsupported.h
@@ -23,7 +23,7 @@
#define SDL_dynapi_unsupported_h_
-#if !(defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
+#if !defined(SDL_PLATFORM_WINDOWS)
typedef struct ID3D12Device ID3D12Device;
typedef void *SDL_WindowsMessageHook;
#endif
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index f718ca20c5849..f1a19d064f781 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -26,7 +26,7 @@
#include "../video/SDL_sysvideo.h"
#include "SDL_events_c.h"
#include "SDL_mouse_c.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "../core/windows/SDL_windows.h" // For GetDoubleClickTime()
#endif
diff --git a/src/file/SDL_iostream.c b/src/file/SDL_iostream.c
index f4378b8692814..e00438bde4e1a 100644
--- a/src/file/SDL_iostream.c
+++ b/src/file/SDL_iostream.c
@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "../core/windows/SDL_windows.h"
#endif
@@ -54,7 +54,7 @@ struct SDL_IOStream
#include "../core/android/SDL_android.h"
#endif
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
typedef struct IOStreamWindowsData
{
@@ -276,9 +276,9 @@ static SDL_bool SDLCALL windows_file_close(void *userdata)
SDL_free(iodata);
return true;
}
-#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#endif // defined(SDL_PLATFORM_WINDOWS)
-#if defined(HAVE_STDIO_H) && !(defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK))
+#if defined(HAVE_STDIO_H) && !defined(SDL_PLATFORM_WINDOWS)
// Functions to read/write stdio file pointers. Not used for windows.
@@ -429,7 +429,7 @@ static SDL_IOStream *SDL_IOFromFP(FILE *fp, bool autoclose)
return iostr;
}
-#endif // !HAVE_STDIO_H && !(SDL_PLATFORM_WIN32 || SDL_PLATFORM_GDK)
+#endif // !HAVE_STDIO_H && !defined(SDL_PLATFORM_WINDOWS)
// Functions to read/write memory pointers
@@ -604,7 +604,7 @@ SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)
}
}
-#elif defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#elif defined(SDL_PLATFORM_WINDOWS)
IOStreamWindowsData *iodata = (IOStreamWindowsData *) SDL_malloc(sizeof (*iodata));
if (!iodata) {
return NULL;
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index af5ae6f70f1bd..84b72fb797821 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -787,16 +787,12 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
return result;
}
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
-
static DXGI_MODE_ROTATION D3D11_GetCurrentRotation(void)
{
// FIXME
return DXGI_MODE_ROTATION_IDENTITY;
}
-#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
-
static BOOL D3D11_IsDisplayRotated90Degrees(DXGI_MODE_ROTATION rotation)
{
switch (rotation) {
diff --git a/src/render/software/SDL_rotate.c b/src/render/software/SDL_rotate.c
index 2fa726880da39..ade10286e8fb5 100644
--- a/src/render/software/SDL_rotate.c
+++ b/src/render/software/SDL_rotate.c
@@ -32,7 +32,7 @@ Andreas Schiffler -- aschiffler at ferzkopp dot net
#ifdef SDL_VIDEO_RENDER_SW
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
#include "../../core/windows/SDL_windows.h"
#endif
diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c
index 394b7f71c3277..e5d8fb571433f 100644
--- a/src/stdlib/SDL_iconv.c
+++ b/src/stdlib/SDL_iconv.c
@@ -126,7 +126,7 @@ static struct
{ "US-ASCII", ENCODING_ASCII },
{ "8859-1", ENCODING_LATIN1 },
{ "ISO-8859-1", ENCODING_LATIN1 },
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_OS2) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS) || defined(SDL_PLATFORM_OS2)
{ "WCHAR_T", ENCODING_UTF16LE },
#else
{ "WCHAR_T", ENCODING_UCS4NATIVE },
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index a20acffd88f82..546f246110301 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -340,7 +340,7 @@ SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props,
SDL_FunctionPointer pfnEndThread)
{
// rather than check this in every backend, just make sure it's correct upfront. Only allow non-NULL if Windows, or Microsoft GDK.
- #if (!defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_GDK))
+ #if !defined(SDL_PLATFORM_WINDOWS)
if (pfnBeginThread || pfnEndThread) {
SDL_SetError("_beginthreadex/_endthreadex not supported on this platform");
return NULL;
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 93719dd61567a..c6b19ec0a4e1d 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2411,7 +2411,7 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
/* Clear minimized if not on windows, only windows handles it at create rather than FinishWindowCreation,
* but it's important or window focus will get broken on windows!
*/
-#if !defined(SDL_PLATFORM_WIN32) && !defined(SDL_PLATFORM_GDK)
+#if !defined(SDL_PLATFORM_WINDOWS)
if (window->flags & SDL_WINDOW_MINIMIZED) {
window->flags &= ~SDL_WINDOW_MINIMIZED;
}
diff --git a/src/video/SDL_video_unsupported.c b/src/video/SDL_video_unsupported.c
index 5467b7986e553..212907e187829 100644
--- a/src/video/SDL_video_unsupported.c
+++ b/src/video/SDL_video_unsupported.c
@@ -22,7 +22,7 @@
#ifndef SDL_VIDEO_DRIVER_WINDOWS
-#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
+#if defined(SDL_PLATFORM_WINDOWS)
SDL_bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
{
@@ -40,7 +40,7 @@ void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
{
}
-#endif // SDL_PLATFORM_WIN32 || SDL_PLATFORM_GDK
+#endif // defined(SDL_PLATFORM_WINDOWS)
SDL_DECLSPEC SDL_bool SDLCALL SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);
SDL_bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex)