From 137d4515585efa145baca6bf52afd1eb702a6bbc Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 27 Nov 2022 20:29:40 +0300
Subject: [PATCH] minor clean-up.
---
src/SDL12_compat_objc.m | 5 +----
src/SDL20_include_wrapper.h | 11 +++++------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/SDL12_compat_objc.m b/src/SDL12_compat_objc.m
index 30b97b3fe..ca46b5ee5 100644
--- a/src/SDL12_compat_objc.m
+++ b/src/SDL12_compat_objc.m
@@ -21,10 +21,7 @@
/* This file contains some macOS-specific support code */
-#define __BUILDING_SDL12_COMPAT__ 1
-#include "SDL.h"
-
-#ifdef __MACOSX__
+#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#if __GNUC__ >= 4
diff --git a/src/SDL20_include_wrapper.h b/src/SDL20_include_wrapper.h
index a1c21b1f3..3f8461ef0 100644
--- a/src/SDL20_include_wrapper.h
+++ b/src/SDL20_include_wrapper.h
@@ -131,15 +131,14 @@
#define __BUILDING_SDL12_COMPAT__ 1
#include "SDL.h"
-#include "SDL_syswm.h" /* includes windows.h for _WIN32, os2.h for __OS2__ */
+#include "SDL_syswm.h" /* includes windows.h or os2.h */
-/* Headers from SDL2 >= 2.0.7 needed for SDL_AudioStream:
- */
+/* Headers from SDL2 >= 2.0.7 needed for SDL_AudioStream. */
#if !SDL_VERSION_ATLEAST(2,0,7)
#error You need to compile against SDL >= 2.0.7 headers.
#endif
-/* Missing SDL_thread.h stuff (see above): */
+/* Missing SDL_thread.h stuff (see above) */
#if defined(_WIN32) || defined(__OS2__)
typedef struct SDL_Thread SDL_Thread;
typedef int (SDLCALL *SDL_ThreadFunction) (void*);
@@ -152,7 +151,8 @@ typedef void (*pfnSDL_CurrentEndThread) (void);
typedef UINT_PTR (__cdecl *pfnSDL_CurrentBeginThread)
(void*, unsigned, unsigned (__stdcall *func)(void*), void*, unsigned, unsigned*);
typedef void (__cdecl *pfnSDL_CurrentEndThread) (unsigned);
-/* the following macros from Win32 SDK headers are harmful here: */
+/* the following macros from Win32 SDK headers are harmful here. */
+#undef CreateWindow
#undef CreateThread
#undef CreateSemaphore
#undef CreateMutex
@@ -431,4 +431,3 @@ typedef void (__cdecl *pfnSDL_CurrentEndThread) (unsigned);
#endif
/* vi: set ts=4 sw=4 expandtab: */
-