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

@@ -36,7 +36,7 @@
/* This is included in only one place because it has a large static list of controllers */
#include "controller_type.h"
#if defined(__WIN32__) || defined(__WINGDK__)
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
/* Needed for checking for input remapping programs */
#include "../core/windows/SDL_windows.h"
@@ -70,7 +70,7 @@ static SDL_JoystickDriver *SDL_joystick_drivers[] = {
#ifdef SDL_JOYSTICK_IOKIT
&SDL_DARWIN_JoystickDriver,
#endif
#if (defined(__MACOS__) || defined(__IOS__) || defined(__TVOS__)) && !defined(SDL_JOYSTICK_DISABLED)
#if (defined(SDL_PLATFORM_MACOS) || defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_TVOS)) && !defined(SDL_JOYSTICK_DISABLED)
&SDL_IOS_JoystickDriver,
#endif
#ifdef SDL_JOYSTICK_ANDROID
@@ -774,7 +774,7 @@ int SDL_GetJoystickInstancePlayerIndex(SDL_JoystickID instance_id)
*/
static SDL_bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick)
{
#ifdef __WINRT__
#ifdef SDL_PLATFORM_WINRT
return SDL_TRUE;
#else
/*printf("JOYSTICK '%s' VID/PID 0x%.4x/0x%.4x AXES: %d\n", joystick->name, vendor, product, joystick->naxes);*/
@@ -785,7 +785,7 @@ static SDL_bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick)
}
return SDL_VIDPIDInList(SDL_GetJoystickVendor(joystick), SDL_GetJoystickProduct(joystick), &zero_centered_devices);
#endif /* __WINRT__ */
#endif /* SDL_PLATFORM_WINRT */
}
static SDL_bool IsROGAlly(SDL_Joystick *joystick)