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:
parent
08d05e245d
commit
266504a0ac
@ -13,10 +13,16 @@ s32 cellUserInfoGetStat(u32 id, vm::ptr<CellUserInfoUserStat> stat)
|
|||||||
{
|
{
|
||||||
cellUserInfo.Warning("cellUserInfoGetStat(id=%d, stat=*0x%x)", id, 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;
|
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);
|
sprintf(path, "/dev_hdd0/home/%08d", id);
|
||||||
if (!Emu.GetVFS().ExistsDir(path))
|
if (!Emu.GetVFS().ExistsDir(path))
|
||||||
return CELL_USERINFO_ERROR_NOUSER;
|
return CELL_USERINFO_ERROR_NOUSER;
|
||||||
|
@ -27,6 +27,12 @@ enum CellUserInfoListType
|
|||||||
CELL_USERINFO_LISTTYPE_NOCURRENT = 1,
|
CELL_USERINFO_LISTTYPE_NOCURRENT = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CELL_SYSUTIL_USERID_CURRENT = 0,
|
||||||
|
CELL_SYSUTIL_USERID_MAX = 99999999,
|
||||||
|
};
|
||||||
|
|
||||||
// Structs
|
// Structs
|
||||||
struct CellUserInfoUserStat
|
struct CellUserInfoUserStat
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user