1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00

CellUser: Fix cellUserInfoGetStat for 'userid_current'

This commit is contained in:
Jake 2015-12-11 11:09:24 -06:00
parent 08d05e245d
commit 266504a0ac
2 changed files with 14 additions and 2 deletions

View File

@ -13,10 +13,16 @@ s32 cellUserInfoGetStat(u32 id, vm::ptr<CellUserInfoUserStat> stat)
{
cellUserInfo.Warning("cellUserInfoGetStat(id=%d, stat=*0x%x)", id, stat);
if (id > CELL_USERINFO_USER_MAX)
if (id > CELL_SYSUTIL_USERID_MAX)
return CELL_USERINFO_ERROR_NOUSER;
char path [256];
if (id == CELL_SYSUTIL_USERID_CURRENT)
{
// TODO: Return current user/profile when that is implemented
id = 1;
}
char path[256];
sprintf(path, "/dev_hdd0/home/%08d", id);
if (!Emu.GetVFS().ExistsDir(path))
return CELL_USERINFO_ERROR_NOUSER;

View File

@ -27,6 +27,12 @@ enum CellUserInfoListType
CELL_USERINFO_LISTTYPE_NOCURRENT = 1,
};
enum
{
CELL_SYSUTIL_USERID_CURRENT = 0,
CELL_SYSUTIL_USERID_MAX = 99999999,
};
// Structs
struct CellUserInfoUserStat
{