mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-10 12:41:39 +00:00
engine: psvita: implement Sys_GetCurrentUser
This commit is contained in:
parent
89ec39821e
commit
610d528042
@ -40,6 +40,10 @@ GNU General Public License for more details.
|
|||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if XASH_PSVITA
|
||||||
|
#include <vitasdk.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "menu_int.h" // _UPDATE_PAGE macro
|
#include "menu_int.h" // _UPDATE_PAGE macro
|
||||||
|
|
||||||
#include "library.h"
|
#include "library.h"
|
||||||
@ -129,7 +133,12 @@ const char *Sys_GetCurrentUser( void )
|
|||||||
|
|
||||||
if( GetUserName( s_userName, &size ))
|
if( GetUserName( s_userName, &size ))
|
||||||
return s_userName;
|
return s_userName;
|
||||||
#elif XASH_POSIX && !XASH_ANDROID && !XASH_NSWITCH && !XASH_PSVITA
|
#elif XASH_PSVITA
|
||||||
|
static string username;
|
||||||
|
sceAppUtilSystemParamGetString( SCE_SYSTEM_PARAM_ID_USERNAME, username, sizeof( username ) - 1 );
|
||||||
|
if( username[0] )
|
||||||
|
return username;
|
||||||
|
#elif XASH_POSIX && !XASH_ANDROID && !XASH_NSWITCH
|
||||||
uid_t uid = geteuid();
|
uid_t uid = geteuid();
|
||||||
struct passwd *pw = getpwuid( uid );
|
struct passwd *pw = getpwuid( uid );
|
||||||
|
|
||||||
@ -583,7 +592,7 @@ qboolean Sys_NewInstance( const char *gamedir )
|
|||||||
exit( 0 );
|
exit( 0 );
|
||||||
#elif XASH_PSVITA
|
#elif XASH_PSVITA
|
||||||
fprintf( stderr, "Sys_NewInstance( %s ): not implemented yet\n", gamedir );
|
fprintf( stderr, "Sys_NewInstance( %s ): not implemented yet\n", gamedir );
|
||||||
exit( 1 );
|
exit( 0 );
|
||||||
#else
|
#else
|
||||||
int i = 0;
|
int i = 0;
|
||||||
qboolean replacedArg = false;
|
qboolean replacedArg = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user