Commit f0a05ed476d7792e36b12fef96706101eef29791

Francisco Javier Trujillo Mata 2022-06-06T00:04:56

Add some PS2 flags

diff --git a/include/SDL_platform.h b/include/SDL_platform.h
index c0bccb0..b70fb02 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 a65d9c5..0afaeb1 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 e37444f..dc53e58 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 2e4bb14..f560cca 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