From f0a05ed476d7792e36b12fef96706101eef29791 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 6 Jun 2022 00:04:56 +0200 Subject: [PATCH] Add some PS2 flags --- include/SDL_platform.h | 3 +++ src/SDL.c | 2 ++ src/dynapi/SDL_dynapi.h | 2 ++ src/libm/math_private.h | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/SDL_platform.h b/include/SDL_platform.h index c0bccb093..b70fb02fd 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -183,6 +183,9 @@ #undef __PSP__ #define __PSP__ 1 #endif +#if defined(PS2) +#define __PS2__ 1 +#endif /* The NACL compiler defines __native_client__ and __pnacl__ * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi diff --git a/src/SDL.c b/src/SDL.c index a65d9c519..0afaeb18c 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -583,6 +583,8 @@ SDL_GetPlatform(void) return "tvOS"; #elif __IPHONEOS__ return "iOS"; +#elif __PS2__ + return "PlayStation 2"; #elif __PSP__ return "PlayStation Portable"; #elif __VITA__ diff --git a/src/dynapi/SDL_dynapi.h b/src/dynapi/SDL_dynapi.h index e37444fd9..dc53e58b2 100644 --- a/src/dynapi/SDL_dynapi.h +++ b/src/dynapi/SDL_dynapi.h @@ -51,6 +51,8 @@ #define SDL_DYNAMIC_API 0 #elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */ #define SDL_DYNAMIC_API 0 +#elif defined(__PS2__) && __PS2__ +#define SDL_DYNAMIC_API 0 #elif defined(__PSP__) && __PSP__ #define SDL_DYNAMIC_API 0 #elif defined(__riscos__) && __riscos__ /* probably not useful on RISC OS, since dlopen() can't be used when using static linking. */ diff --git a/src/libm/math_private.h b/src/libm/math_private.h index 2e4bb1402..f560cca6a 100644 --- a/src/libm/math_private.h +++ b/src/libm/math_private.h @@ -27,7 +27,7 @@ #define libm_hidden_def(x) #define strong_alias(x, y) -#if !defined(__HAIKU__) && !defined(__PSP__) /* already defined in a system header. */ +#if !defined(__HAIKU__) && !defined(__PSP__) && !defined(__PS2__) /* already defined in a system header. */ typedef unsigned int u_int32_t; #endif