Skip to content

Commit

Permalink
Use Apple's nomenclature for macOS and iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 26, 2022
1 parent 5fb3eb9 commit cc1f9eb
Show file tree
Hide file tree
Showing 83 changed files with 291 additions and 296 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions WhatsNew.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions Xcode-iOS/Demos/README
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
Loading

0 comments on commit cc1f9eb

Please sign in to comment.