mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 06:21:09 +00:00
Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
This commit is contained in:
@@ -37,10 +37,10 @@
|
||||
#include "SDL_config_wingdk.h"
|
||||
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
|
||||
#include "SDL_config_xbox.h"
|
||||
#elif defined(__MACOSX__)
|
||||
#include "SDL_config_macosx.h"
|
||||
#elif defined(__IPHONEOS__)
|
||||
#include "SDL_config_iphoneos.h"
|
||||
#elif defined(__MACOS__)
|
||||
#include "SDL_config_macos.h"
|
||||
#elif defined(__IOS__)
|
||||
#include "SDL_config_ios.h"
|
||||
#elif defined(__ANDROID__)
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_iphoneos_h_
|
||||
#define SDL_config_iphoneos_h_
|
||||
#ifndef SDL_config_ios_h_
|
||||
#define SDL_config_ios_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
@@ -213,4 +213,4 @@
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
#endif /* SDL_config_iphoneos_h_ */
|
||||
#endif /* SDL_config_ios_h_ */
|
||||
@@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_macosx_h_
|
||||
#define SDL_config_macosx_h_
|
||||
#ifndef SDL_config_macos_h_
|
||||
#define SDL_config_macos_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
@@ -273,4 +273,4 @@
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_macosx_h_ */
|
||||
#endif /* SDL_config_macos_h_ */
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
* This is not necessarily a fast call, so you should call this once near
|
||||
* startup and save the string if you need it.
|
||||
*
|
||||
* **Mac OS X and iOS Specific Functionality**: If the application is in a
|
||||
* **macOS and iOS Specific Functionality**: If the application is in a
|
||||
* ".app" bundle, this function returns the Resource directory (e.g.
|
||||
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
|
||||
* a property to the Info.plist file. Adding a string key with the name
|
||||
@@ -100,7 +100,7 @@ extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||
*
|
||||
* `/home/bob/.local/share/My Program Name/`
|
||||
*
|
||||
* On Mac OS X, the string might look like:
|
||||
* On macOS, the string might look like:
|
||||
*
|
||||
* `/Users/bob/Library/Application Support/My Program Name/`
|
||||
*
|
||||
|
||||
@@ -194,7 +194,7 @@ extern "C" {
|
||||
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the audio category on iOS and Mac OS X
|
||||
* \brief A variable controlling the audio category on iOS and macOS
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
@@ -1076,7 +1076,7 @@ extern "C" {
|
||||
/**
|
||||
* \brief When set don't force the SDL app to become a foreground process
|
||||
*
|
||||
* This hint only applies to Mac OS X.
|
||||
* This hint only applies to macOS.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
|
||||
@@ -1685,9 +1685,9 @@ extern "C" {
|
||||
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
||||
* \brief A variable that dictates policy for fullscreen Spaces on macOS.
|
||||
*
|
||||
* This hint only applies to Mac OS X.
|
||||
* This hint only applies to macOS.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__IPHONEOS__)
|
||||
#elif defined(__IOS__)
|
||||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
and starts the iOS application run loop.
|
||||
|
||||
@@ -224,7 +224,7 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * r
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
#if defined(__IPHONEOS__)
|
||||
#if defined(__IOS__)
|
||||
|
||||
/**
|
||||
* Initializes and launches an SDL application.
|
||||
@@ -238,7 +238,7 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * r
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
|
||||
|
||||
#endif /* __IPHONEOS__ */
|
||||
#endif /* __IOS__ */
|
||||
|
||||
#ifdef __GDK__
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifndef __IPHONEOS__ /* No OpenGL on iOS. */
|
||||
#ifndef __IOS__ /* No OpenGL on iOS. */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
@@ -2118,7 +2118,7 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
|
||||
|
||||
#endif /* __gl_h_ */
|
||||
|
||||
#endif /* !__IPHONEOS__ */
|
||||
#endif /* !__IOS__ */
|
||||
|
||||
#endif /* SDL_opengl_h_ */
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#ifdef __IOS__
|
||||
#include <OpenGLES/ES1/gl.h>
|
||||
#include <OpenGLES/ES1/glext.h>
|
||||
#else
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#ifdef __IOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
/* lets us know what version of macOS we're compiling on */
|
||||
#include <AvailabilityMacros.h>
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
@@ -99,17 +99,14 @@
|
||||
#undef __TVOS__
|
||||
#define __TVOS__ 1
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
/* if compiling for iOS */
|
||||
#undef __IPHONEOS__
|
||||
#define __IPHONEOS__ 1
|
||||
#undef __MACOSX__
|
||||
#elif TARGET_OS_IPHONE
|
||||
#undef __IOS__
|
||||
#define __IOS__ 1
|
||||
#else
|
||||
/* if not compiling for iOS */
|
||||
#undef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
#undef __MACOS__
|
||||
#define __MACOS__ 1
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
# error SDL for Mac OS X only supports deploying on 10.7 and above.
|
||||
# error SDL for macOS only supports deploying on 10.7 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1070 */
|
||||
#endif /* TARGET_OS_IPHONE */
|
||||
#endif /* defined(__APPLE__) */
|
||||
@@ -222,7 +219,7 @@ extern "C" {
|
||||
* Here are the names returned for some (but not all) supported platforms:
|
||||
*
|
||||
* - "Windows"
|
||||
* - "Mac OS X"
|
||||
* - "macOS"
|
||||
* - "Linux"
|
||||
* - "iOS"
|
||||
* - "Android"
|
||||
|
||||
@@ -186,7 +186,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID,
|
||||
#endif /* __LINUX__ */
|
||||
|
||||
/* Platform specific functions for iOS */
|
||||
#ifdef __IPHONEOS__
|
||||
#ifdef __IOS__
|
||||
|
||||
#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
|
||||
|
||||
@@ -242,7 +242,7 @@ extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window,
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||
|
||||
#endif /* __IPHONEOS__ */
|
||||
#endif /* __IOS__ */
|
||||
|
||||
|
||||
/* Platform specific functions for Android */
|
||||
@@ -587,7 +587,7 @@ extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
|
||||
#ifdef __IPHONEOS__
|
||||
#ifdef __IOS__
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
#endif /* NULL */
|
||||
#endif /* ! Mac OS X - breaks precompiled headers */
|
||||
#endif /* ! macOS - breaks precompiled headers */
|
||||
|
||||
#ifndef SDL_FALLTHROUGH
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201703L) || \
|
||||
|
||||
Reference in New Issue
Block a user