mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: platform: psvita: implemented function for getting PSID
This commit is contained in:
committed by
Alibek Omarov
parent
407d0aa291
commit
17ff80d85d
@@ -14,6 +14,7 @@ GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user