Define SDL_PLATFORM_* macros instead of underscored ones (#8875)

This commit is contained in:
Anonymous Maarten
2024-01-24 02:40:51 +01:00
committed by GitHub
parent ceccf24519
commit 31d133db40
208 changed files with 1293 additions and 1138 deletions

View File

@@ -31,23 +31,23 @@
*/
/* Add any platform that doesn't build using the configure system. */
#if defined(__WIN32__)
#if defined(SDL_PLATFORM_WIN32)
#include "SDL_build_config_windows.h"
#elif defined(__WINRT__)
#elif defined(SDL_PLATFORM_WINRT)
#include "SDL_build_config_winrt.h"
#elif defined(__WINGDK__)
#elif defined(SDL_PLATFORM_WINGDK)
#include "SDL_build_config_wingdk.h"
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
#elif defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
#include "SDL_build_config_xbox.h"
#elif defined(__MACOS__)
#elif defined(SDL_PLATFORM_MACOS)
#include "SDL_build_config_macos.h"
#elif defined(__IOS__)
#elif defined(SDL_PLATFORM_IOS)
#include "SDL_build_config_ios.h"
#elif defined(__ANDROID__)
#elif defined(SDL_PLATFORM_ANDROID)
#include "SDL_build_config_android.h"
#elif defined(__EMSCRIPTEN__)
#elif defined(SDL_PLATFORM_EMSCRIPTEN)
#include "SDL_build_config_emscripten.h"
#elif defined(__NGAGE__)
#elif defined(SDL_PLATFORM_NGAGE)
#include "SDL_build_config_ngage.h"
#else
/* This is a minimal configuration just to get SDL running on new platforms. */

View File

@@ -76,7 +76,7 @@
#cmakedefine HAVE_CALLOC 1
#cmakedefine HAVE_REALLOC 1
#cmakedefine HAVE_FREE 1
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
#ifndef SDL_PLATFORM_WIN32 /* Don't use C runtime versions of these on Windows */
#cmakedefine HAVE_GETENV 1
#cmakedefine HAVE_SETENV 1
#cmakedefine HAVE_PUTENV 1

View File

@@ -148,7 +148,7 @@
#define SDL_JOYSTICK_MFI 1
#define SDL_JOYSTICK_VIRTUAL 1
#ifdef __TVOS__
#ifdef SDL_PLATFORM_TVOS
#define SDL_SENSOR_DUMMY 1
#else
/* Enable the CoreMotion sensor driver */

View File

@@ -236,7 +236,7 @@ typedef unsigned int uintptr_t;
/* Enable various input drivers */
#define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_HIDAPI 1
#ifndef __WINRT__
#ifndef SDL_PLATFORM_WINRT
#define SDL_JOYSTICK_RAWINPUT 1
#endif
#define SDL_JOYSTICK_VIRTUAL 1