Add boilerplate for PS5 support. (#427)

This commit is contained in:
Daniel Kalmar
2026-09-10 17:43:30 +02:00
committed by GitHub
parent 98ad3bec2a
commit f86bece796
4 changed files with 12 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ namespace bx
|| BX_PLATFORM_NX
# define fseeko64 fseeko
# define ftello64 ftello
# elif BX_PLATFORM_PS4
# elif BX_PLATFORM_PS4 || BX_PLATFORM_PS5
# define fseeko64 fseek
# define ftello64 ftell
# endif // BX_

View File

@@ -161,6 +161,7 @@ namespace bx
static char* pwd(char* _buffer, uint32_t _size)
{
#if BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_CRT_NONE

View File

@@ -23,14 +23,15 @@
# if BX_PLATFORM_IOS \
|| BX_PLATFORM_OSX \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_VISIONOS
# include <pthread.h> // mach_port_t
# endif // BX_PLATFORM_*
# include <time.h> // nanosleep
# if !BX_PLATFORM_PS4
# if !BX_PLATFORM_PS4 && !BX_PLATFORM_PS5
# include <dlfcn.h> // dlopen, dlclose, dlsym
# endif // !BX_PLATFORM_PS4
# endif // !BX_PLATFORM_PS4 && !BX_PLATFORM_PS5
# if BX_PLATFORM_ANDROID
# include <malloc.h> // mallinfo
@@ -161,6 +162,7 @@ namespace bx
return (void*)handle;
#elif BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_NX \
@@ -185,6 +187,7 @@ namespace bx
::FreeLibrary( (HMODULE)_handle);
#elif BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_NX \
@@ -205,6 +208,7 @@ namespace bx
return (void*)::GetProcAddress( (HMODULE)_handle, symbol);
#elif BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_NX \
@@ -229,6 +233,7 @@ namespace bx
return result;
#elif BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_NX \
@@ -273,6 +278,7 @@ namespace bx
::SetEnvironmentVariableA(name, value);
#elif BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_NX \
@@ -293,6 +299,7 @@ namespace bx
int chdir(const char* _path)
{
#if BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_XBOXONE \
|| BX_PLATFORM_WINRT \
|| BX_CRT_NONE

View File

@@ -12,6 +12,7 @@
|| BX_CRT_NONE \
|| BX_PLATFORM_EMSCRIPTEN \
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_PS5 \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_XBOXONE \
)