diff --git a/engine/platform/psvita/sys_psvita.c b/engine/platform/psvita/sys_psvita.c index 7792d5f0..5f878542 100644 --- a/engine/platform/psvita/sys_psvita.c +++ b/engine/platform/psvita/sys_psvita.c @@ -14,6 +14,7 @@ GNU General Public License for more details. */ #include "platform/platform.h" +#include "xash3d_mathlib.h" #include #include #include @@ -201,3 +202,19 @@ qboolean PSVita_GetBasePath( char *buf, const size_t buflen ) return false; } + +int PSVita_GetPSID( char *buf, const size_t buflen ) +{ + SceKernelOpenPsId id; + const int datasize = Q_min( buflen, sizeof( id )); + + if( sceKernelGetOpenPsId( &id ) < 0 ) + { + return 0; + } + else + { + memcpy( buf, &id.id[0], datasize ); + return datasize; + } +}