SDL: Use Apple's nomenclature for macOS and iOS

From cc1f9eb983a056bd4fd19dc4b8699c8b5d1cce77 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 25 Nov 2022 16:00:06 -0800
Subject: [PATCH] Use Apple's nomenclature for macOS and iOS

Fixes https://github.com/libsdl-org/SDL/issues/6621
---
 CMakeLists.txt                                |  12 +-
 CREDITS.txt                                   |   2 +-
 INSTALL.txt                                   |   2 +-
 WhatsNew.txt                                  |   2 +
 Xcode-iOS/Demos/README                        |   4 +-
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       | 112 +++++++++---------
 Xcode/SDL/pkg-support/SDL.info                |   2 +-
 Xcode/SDL/pkg-support/resources/ReadMe.txt    |   6 +-
 .../SDLTest/SDLTest.xcodeproj/project.pbxproj |  20 ++--
 docs/README-android.md                        |   2 +-
 docs/README-ios.md                            |   6 +-
 docs/README-macos.md                          |  20 ++--
 docs/README-migration.md                      |   4 +
 include/SDL_config.h                          |   8 +-
 ...SDL_config_iphoneos.h => SDL_config_ios.h} |   6 +-
 ...SDL_config_macosx.h => SDL_config_macos.h} |   6 +-
 include/SDL_filesystem.h                      |   4 +-
 include/SDL_hints.h                           |   8 +-
 include/SDL_main.h                            |   6 +-
 include/SDL_opengl.h                          |   4 +-
 include/SDL_opengles.h                        |   2 +-
 include/SDL_opengles2.h                       |   2 +-
 include/SDL_platform.h                        |  19 ++-
 include/SDL_system.h                          |   6 +-
 include/begin_code.h                          |   2 +-
 sdl3.m4                                       |   2 +-
 src/SDL.c                                     |  72 ++++++-----
 src/atomic/SDL_atomic.c                       |  12 +-
 src/atomic/SDL_spinlock.c                     |   4 +-
 src/audio/SDL_audiotypecvt.c                  |   4 +-
 src/audio/coreaudio/SDL_coreaudio.h           |   2 +-
 src/audio/coreaudio/SDL_coreaudio.m           |   2 +-
 src/cpuinfo/SDL_cpuinfo.c                     |   6 +-
 src/dynapi/SDL_dynapi_procs.h                 |   6 +-
 src/events/SDL_mouse.c                        |   2 +-
 src/file/cocoa/SDL_rwopsbundlesupport.m       |   2 +-
 src/haptic/darwin/SDL_syshaptic.c             |   6 +-
 src/hidapi/SDL_hidapi.c                       |  22 ++--
 src/hidapi/hidapi/hidapi.h                    |   2 +-
 src/joystick/SDL_gamecontroller.c             |   4 +-
 src/joystick/SDL_gamecontrollerdb.h           |   2 +-
 src/joystick/SDL_joystick.c                   |   2 +-
 .../{iphoneos => apple}/SDL_mfijoystick.m     |  12 +-
 .../{iphoneos => apple}/SDL_mfijoystick_c.h   |   0
 src/joystick/hidapi/SDL_hidapi_luna.c         |   2 +-
 src/joystick/hidapi/SDL_hidapi_ps3.c          |   2 +-
 src/joystick/hidapi/SDL_hidapi_steam.c        |   2 +-
 src/joystick/hidapi/SDL_hidapi_xbox360.c      |  10 +-
 src/joystick/hidapi/SDL_hidapi_xboxone.c      |   2 +-
 src/joystick/hidapi/SDL_hidapijoystick_c.h    |   4 +-
 src/locale/{macosx => macos}/SDL_syslocale.m  |   0
 src/main/uikit/SDL_uikit_main.c               |   4 +-
 src/misc/{macosx => macos}/SDL_sysurl.m       |   0
 src/power/SDL_power.c                         |   2 +-
 src/power/{macosx => macos}/SDL_syspower.c    |   4 +-
 src/render/SDL_render.c                       |   2 +-
 src/render/metal/SDL_render_metal.m           |  18 +--
 ..._metal_osx.h => SDL_shaders_metal_macos.h} |   0
 src/render/metal/build-metal-shaders.sh       |   2 +-
 src/render/opengl/SDL_render_gl.c             |  14 +--
 src/thread/pthread/SDL_syssem.c               |   6 +-
 src/thread/pthread/SDL_systhread.c            |  18 +--
 src/timer/unix/SDL_systimer.c                 |   2 +-
 src/video/SDL_blit.c                          |   4 +-
 src/video/SDL_blit_N.c                        |   6 +-
 src/video/SDL_video.c                         |  12 +-
 src/video/cocoa/SDL_cocoaevents.m             |   2 +-
 src/video/cocoa/SDL_cocoamouse.m              |   2 +-
 src/video/cocoa/SDL_cocoavideo.m              |   2 +-
 src/video/cocoa/SDL_cocoawindow.m             |   8 +-
 src/video/x11/SDL_x11opengl.c                 |   2 +-
 test/checkkeys.c                              |   2 +-
 test/checkkeysthreads.c                       |   2 +-
 test/testautomation_surface.c                 |   2 +-
 test/testdropfile.c                           |   2 +-
 test/testfile.c                               |   2 +-
 test/testgles.c                               |   2 +-
 test/testgles2.c                              |   2 +-
 test/testgles2_sdf.c                          |   2 +-
 test/testime.c                                |   2 +-
 test/testjoystick.c                           |   2 +-
 test/testmessage.c                            |   2 +-
 test/testmouse.c                              |   2 +-
 83 files changed, 291 insertions(+), 296 deletions(-)
 rename include/{SDL_config_iphoneos.h => SDL_config_ios.h} (98%)
 rename include/{SDL_config_macosx.h => SDL_config_macos.h} (98%)
 rename src/joystick/{iphoneos => apple}/SDL_mfijoystick.m (99%)
 rename src/joystick/{iphoneos => apple}/SDL_mfijoystick_c.h (100%)
 rename src/locale/{macosx => macos}/SDL_syslocale.m (100%)
 rename src/misc/{macosx => macos}/SDL_sysurl.m (100%)
 rename src/power/{macosx => macos}/SDL_syspower.c (98%)
 rename src/render/metal/{SDL_shaders_metal_osx.h => SDL_shaders_metal_macos.h} (100%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f58282375f35..d3f5a8835359 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,7 +209,7 @@ mark_as_advanced(SDL_CHECK_REQUIRED_INCLUDES SDL_CHECK_REQUIRED_LINK_OPTIONS)
 list(APPEND CMAKE_REQUIRED_INCLUDES ${SDL_CHECK_REQUIRED_INCLUDES})
 list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${SDL_CHECK_REQUIRED_LINK_OPTIONS})
 
-# Don't mistake osx for unix
+# Don't mistake macOS for unix
 if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS)
   set(UNIX_SYS ON)
 else()
@@ -2033,7 +2033,7 @@ elseif(WINDOWS)
   endif()
 
 elseif(APPLE)
-  # TODO: rework this all for proper MacOS X, iOS and Darwin support
+  # TODO: rework this all for proper macOS, iOS and Darwin support
 
   # We always need these libs on macOS at the moment.
   # !!! FIXME: we need Carbon for some very old API calls in
@@ -2061,7 +2061,7 @@ elseif(APPLE)
     if(IOS OR TVOS)
       file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/ios/*.m)
     else()
-      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/macosx/*.m)
+      file(GLOB MISC_SOURCES ${SDL3_SOURCE_DIR}/src/misc/macos/*.m)
     endif()
     list(APPEND SOURCE_FILES ${MISC_SOURCES})
     set(HAVE_SDL_MISC TRUE)
@@ -2082,7 +2082,7 @@ elseif(APPLE)
   endif()
 
   if(SDL_JOYSTICK)
-    file(GLOB MFI_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/iphoneos/*.m)
+    file(GLOB MFI_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/apple/*.m)
     if(IOS OR TVOS)
       file(GLOB JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/steam/*.c)
       set(SDL_JOYSTICK_MFI 1)
@@ -2145,7 +2145,7 @@ elseif(APPLE)
       file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/uikit/*.m)
       set(SDL_POWER_UIKIT 1)
     else()
-      file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/macosx/*.c)
+      file(GLOB POWER_SOURCES ${SDL3_SOURCE_DIR}/src/power/macos/*.c)
       set(SDL_POWER_MACOSX 1)
       set(SDL_FRAMEWORK_IOKIT 1)
     endif()
@@ -2154,7 +2154,7 @@ elseif(APPLE)
   endif()
 
   if(SDL_LOCALE)
-    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/macosx/*.m)
+    file(GLOB LOCALE_SOURCES ${SDL3_SOURCE_DIR}/src/locale/macos/*.m)
     list(APPEND SOURCE_FILES ${LOCALE_SOURCES})
     set(HAVE_SDL_LOCALE TRUE)
   endif()
diff --git a/CREDITS.txt b/CREDITS.txt
index 74163e8244a7..3243318b050f 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -17,7 +17,7 @@ Thanks to everyone who made this possible, including:
 
 * Alfred Reynolds for the game controller API and general (in)sanity
 
-* Jørgen Tjernø for numerous magical Mac OS X fixes.
+* Jørgen Tjernø for numerous magical macOS fixes.
 
 * Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.
  
diff --git a/INSTALL.txt b/INSTALL.txt
index 424919ed19e7..9faadeb0fbd9 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -11,7 +11,7 @@ To compile and install SDL:
         * Run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake && cmake --build build && cmake --install build
 
         macOS with Xcode:
-        * Read docs/README-macosx.md
+        * Read docs/README-macos.md
 
         macOS from the command line:
         * Run: cmake -S . -B build && cmake --build build && cmake --install build
diff --git a/WhatsNew.txt b/WhatsNew.txt
index c740f8ec660e..24283e8ef57f 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -8,6 +8,8 @@ This is a list of major changes in SDL's version history.
 General:
 * M_PI is no longer defined in SDL_stdinc.h, now the symbols SDL_PI_D (double) and SDL_PI_F (float) are available
 * SDL_GetWindowWMInfo() returns a standard int result code instead of SDL_bool, and takes SDL_SYSWM_CURRENT_VERSION as a new third parameter
+* The preprocessor symbol __MACOSX__ has been renamed __MACOS__
+* The preprocessor symbol __IPHONEOS__ has been renamed __IOS__
 * Removed the following functions from the API:
 	* SDL_CalculateGammaRamp()
 	* SDL_GetRevisionNumber()
diff --git a/Xcode-iOS/Demos/README b/Xcode-iOS/Demos/README
index d0f4ea179a71..43825df706ba 100644
--- a/Xcode-iOS/Demos/README
+++ b/Xcode-iOS/Demos/README
@@ -18,11 +18,11 @@ Happy (happy.c):
 
 Accelerometer (accelerometer.c):
 
-	Uses the iPhone's accelerometer as a joystick device to move a spaceship around the screen.  Note the use of the macro SDL_IPHONE_MAX_GFORCE (normally defined in SDL_config_iphoneos.h) which converts between the Sint16 number returned by SDL_JoystickGetAxis, and the floating point units of g-force reported natively by the iPhone. 
+	Uses the iPhone's accelerometer as a joystick device to move a spaceship around the screen.  Note the use of the macro SDL_IPHONE_MAX_GFORCE (normally defined in SDL_config_ios.h) which converts between the Sint16 number returned by SDL_JoystickGetAxis, and the floating point units of g-force reported natively by the iPhone. 
 
 Touch (touch.c):
 
-	Acts as a finger-paint type program.  Demonstrates how you can use SDL mouse input to accept touch input from the iPhone.  If SDL for iPhone is compiled with multitouch as multiple mouse emulation (SDL_IPHONE_MULTIPLE_MICE in SDL_config_iphoneos.h) then the program will accept multiple finger inputs simultaneously. 
+	Acts as a finger-paint type program.  Demonstrates how you can use SDL mouse input to accept touch input from the iPhone.  If SDL for iPhone is compiled with multitouch as multiple mouse emulation (SDL_IPHONE_MULTIPLE_MICE in SDL_config_ios.h) then the program will accept multiple finger inputs simultaneously. 
 
 Mixer (mixer.c):
 
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 40b04d63f1e8..87c0789e52c9 100644
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -152,7 +152,7 @@
 		A75FCD0723E25AB700529352 /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90E23E2514000DCD162 /* SDL_glfuncs.h */; };
 		A75FCD0823E25AB700529352 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CA1595D4D800BBD41B /* SDL_atomic.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCD0923E25AB700529352 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */; };
-		A75FCD0B23E25AB700529352 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
+		A75FCD0B23E25AB700529352 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
 		A75FCD0C23E25AB700529352 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8DF23E2514000DCD162 /* SDL_shaders_metal_ios.h */; };
 		A75FCD0D23E25AB700529352 /* SDL_offscreenwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5F523E2513D00DCD162 /* SDL_offscreenwindow.h */; };
 		A75FCD0E23E25AB700529352 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -528,7 +528,7 @@
 		A75FCEC023E25AC700529352 /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90E23E2514000DCD162 /* SDL_glfuncs.h */; };
 		A75FCEC123E25AC700529352 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CA1595D4D800BBD41B /* SDL_atomic.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A75FCEC223E25AC700529352 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */; };
-		A75FCEC423E25AC700529352 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
+		A75FCEC423E25AC700529352 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
 		A75FCEC523E25AC700529352 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8DF23E2514000DCD162 /* SDL_shaders_metal_ios.h */; };
 		A75FCEC623E25AC700529352 /* SDL_offscreenwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5F523E2513D00DCD162 /* SDL_offscreenwindow.h */; };
 		A75FCEC723E25AC700529352 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -896,12 +896,12 @@
 		A75FDAC023E28B8000529352 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDABF23E28B8000529352 /* CoreMotion.framework */; };
 		A75FDAC223E28B9600529352 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDAC123E28B9600529352 /* CoreGraphics.framework */; };
 		A75FDAC423E28BA700529352 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A75FDAC323E28BA700529352 /* CoreBluetooth.framework */; };
-		A75FDAF623E35EC400529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A75FDAF723E35EC400529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		A75FDAF823E35ED500529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; };
-		A75FDAF923E35ED500529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; };
-		A75FDAFA23E35ED600529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; };
-		A75FDAFB23E35ED700529352 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */; };
+		A75FDAF623E35EC400529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		A75FDAF723E35EC400529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		A75FDAF823E35ED500529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
+		A75FDAF923E35ED500529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
+		A75FDAFA23E35ED600529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
+		A75FDAFB23E35ED700529352 /* SDL_config_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDAF523E35EC400529352 /* SDL_config_ios.h */; };
 		A75FDB5823E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
 		A75FDB5923E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
 		A75FDB5A23E39E6100529352 /* hidapi.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDB5723E39E6100529352 /* hidapi.h */; };
@@ -941,7 +941,7 @@
 		A769B08D23E259AE00872273 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60D23E2513D00DCD162 /* SDL_shape_internals.h */; };
 		A769B08E23E259AE00872273 /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90E23E2514000DCD162 /* SDL_glfuncs.h */; };
 		A769B09023E259AE00872273 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A60C23E2513D00DCD162 /* SDL_rect_c.h */; };
-		A769B09223E259AE00872273 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
+		A769B09223E259AE00872273 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
 		A769B09323E259AE00872273 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8DF23E2514000DCD162 /* SDL_shaders_metal_ios.h */; };
 		A769B09423E259AE00872273 /* SDL_offscreenwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A5F523E2513D00DCD162 /* SDL_offscreenwindow.h */; };
 		A769B09623E259AE00872273 /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A57B23E2513D00DCD162 /* SDL_coremotionsensor.h */; };
@@ -2702,12 +2702,12 @@
 		A7D8B99523E2514400DCD162 /* SDL_shaders_metal.metal in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8E023E2514000DCD162 /* SDL_shaders_metal.metal */; };
 		A7D8B99623E2514400DCD162 /* SDL_shaders_metal.metal in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8E023E2514000DCD162 /* SDL_shaders_metal.metal */; };
 		A7D8B99723E2514400DCD162 /* SDL_shaders_metal.metal in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8E023E2514000DCD162 /* SDL_shaders_metal.metal */; };
-		A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
-		A7D8B99C23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
-		A7D8B99D23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
-		A7D8B99E23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
-		A7D8B99F23E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
-		A7D8B9A023E2514400DCD162 /* SDL_shaders_metal_osx.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */; };
+		A7D8B99B23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
+		A7D8B99C23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
+		A7D8B99D23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
+		A7D8B99E23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
+		A7D8B99F23E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
+		A7D8B9A023E2514400DCD162 /* SDL_shaders_metal_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */; };
 		A7D8B9A123E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */; };
 		A7D8B9A223E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */; };
 		A7D8B9A323E2514400DCD162 /* SDL_shaders_metal_tvos.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */; };
@@ -3250,7 +3250,7 @@
 		AA7558021595D4D800BBD41B /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558041595D4D800BBD41B /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558061595D4D800BBD41B /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AA7558081595D4D800BBD41B /* SDL_config_macosx.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macosx.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		AA7558081595D4D800BBD41B /* SDL_config_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75580A1595D4D800BBD41B /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75580C1595D4D800BBD41B /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75580E1595D4D800BBD41B /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3315,7 +3315,7 @@
 		DB313FCC17554B71006C0E22 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FCD17554B71006C0E22 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FCE17554B71006C0E22 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		DB313FCF17554B71006C0E22 /* SDL_config_macosx.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macosx.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		DB313FCF17554B71006C0E22 /* SDL_config_macos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD017554B71006C0E22 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD117554B71006C0E22 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		DB313FD217554B71006C0E22 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3690,7 +3690,7 @@
 		564624351FF821B80074AC87 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		564624371FF821CB0074AC87 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
 		566E26792462701100718109 /* SDL_locale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_locale.h; sourceTree = "<group>"; };
-		566E26CC246274CB00718109 /* SDL_syslocale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_syslocale.m; path = locale/macosx/SDL_syslocale.m; sourceTree = "<group>"; };
+		566E26CC246274CB00718109 /* SDL_syslocale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_syslocale.m; path = locale/macos/SDL_syslocale.m; sourceTree = "<group>"; };
 		566E26CD246274CB00718109 /* SDL_locale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_locale.c; path = locale/SDL_locale.c; sourceTree = "<group>"; };
 		566E26CE246274CC00718109 /* SDL_syslocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syslocale.h; path = locale/SDL_syslocale.h; sourceTree = "<group>"; };
 		567E2F2017C44C35005F1892 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; };
@@ -3713,7 +3713,7 @@
 		A75FDABF23E28B8000529352 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		A75FDAC123E28B9600529352 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
 		A75FDAC323E28BA700529352 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
-		A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_iphoneos.h; sourceTree = "<group>"; };
+		A75FDAF523E35EC400529352 /* SDL_config_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_ios.h; sourceTree = "<group>"; };
 		A75FDB5723E39E6100529352 /* hidapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hidapi.h; path = hidapi/hidapi.h; sourceTree = "<group>"; };
 		A75FDB9223E4C8DB00529352 /* hid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hid.c; sourceTree = "<group>"; };
 		A75FDBA323E4CB6F00529352 /* LICENSE-bsd.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "LICENSE-bsd.txt"; sourceTree = "<group>"; };
@@ -3960,7 +3960,7 @@
 		A7D8A8DE23E2514000DCD162 /* SDL_render_metal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_render_metal.m; sourceTree = "<group>"; };
 		A7D8A8DF23E2514000DCD162 /* SDL_shaders_metal_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_ios.h; sourceTree = "<group>"; };
 		A7D8A8E023E2514000DCD162 /* SDL_shaders_metal.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = SDL_shaders_metal.metal; sourceTree = "<group>"; };
-		A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_osx.h; sourceTree = "<group>"; };
+		A7D8A8E223E2514000DCD162 /* SDL_shaders_metal_macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_macos.h; sourceTree = "<group>"; };
 		A7D8A8E323E2514000DCD162 /* SDL_shaders_metal_tvos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_tvos.h; sourceTree = "<group>"; };
 		A7D8A8EC23E2514000DCD162 /* SDL_yuv_sw_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_yuv_sw_c.h; sourceTree = "<group>"; };
 		A7D8A8ED23E2514000DCD162 /* SDL_yuv_sw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_yuv_sw.c; sourceTree = "<group>"; };
@@ -4047,7 +4047,7 @@
 		AA7557CB1595D4D800BBD41B /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audio.h; sourceTree = "<group>"; };
 		AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blendmode.h; sourceTree = "<group>"; };
 		AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_clipboard.h; sourceTree = "<group>"; };
-		AA7557CE1595D4D800BBD41B /* SDL_config_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_macosx.h; sourceTree = "<group>"; };
+		AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config_macos.h; sourceTree = "<group>"; };
 		AA7557CF1595D4D800BBD41B /* SDL_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_config.h; sourceTree = "<group>"; };
 		AA7557D01595D4D800BBD41B /* SDL_copying.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_copying.h; sourceTree = "<group>"; };
 		AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cpuinfo.h; sourceTree = "<group>"; };
@@ -4318,8 +4318,8 @@
 				AADA5B8616CCAB3000107CF7 /* SDL_bits.h */,
 				AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */,
 				AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */,
-				A75FDAF523E35EC400529352 /* SDL_config_iphoneos.h */,
-				AA7557CE1595D4D800BBD41B /* SDL_config_macosx.h */,
+				A75FDAF523E35EC400529352 /* SDL_config_ios.h */,
+				AA7557CE1595D4D800BBD41B /* SDL_config_macos.h */,
 				AA7557CF1595D4D800BBD41B /* SDL_config.h */,
 				AA7557D01595D4D800BBD41B /* SDL_copying.h */,
 				AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */,
@@ -4471,19 +4471,19 @@
 			isa = PBXGroup;
 			children = (
 				F3ADAB8C2576F08500A6B1D9 /* ios */,
-				5616CA48252BB285005D5928 /* macosx */,
+				5616CA48252BB285005D5928 /* macos */,
 				5616CA4A252BB2A6005D5928 /* SDL_sysurl.h */,
 				5616CA49252BB2A5005D5928 /* SDL_url.c */,
 			);
 			path = misc;
 			sourceTree = "<group>";
 		};
-		5616CA48252BB285005D5928 /* macosx */ = {
+		5616CA48252BB285005D5928 /* macos */ = {
 			isa = PBXGroup;
 			children = (
 				5616CA4B252BB2A6005D5928 /* SDL_sysurl.m */,
 			);
-			path = macosx;
+			path = macos;
 			sourceTree = "<group>";
 		};
 		564624341FF821B70074AC87 /* Frameworks */ = {
@@ -4528,19 +4528,19 @@
 		566E26CB246274AE00718109 /* locale */ = {
 			isa = PBXGroup;
 			children = (
-				566E26EA246274E800718109 /* macosx */,
+				566E26EA246274E800718109 /* macos */,
 				566E26CD246274CB00718109 /* SDL_locale.c

(Patch may be truncated, please check the link at the top of this post.)