mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
Implement sceNpManagerGetCachedInfo
This commit is contained in:
parent
b70665865f
commit
999caea021
1 changed files with 13 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include "Emu/system_utils.hpp"
|
#include "Emu/system_utils.hpp"
|
||||||
#include "Emu/VFS.h"
|
#include "Emu/VFS.h"
|
||||||
#include "Emu/Cell/PPUModule.h"
|
#include "Emu/Cell/PPUModule.h"
|
||||||
|
#include "Emu/Cell/Modules/cellUserInfo.h"
|
||||||
#include "Emu/Io/interception.h"
|
#include "Emu/Io/interception.h"
|
||||||
#include "Utilities/StrUtil.h"
|
#include "Utilities/StrUtil.h"
|
||||||
|
|
||||||
|
@ -3354,7 +3355,7 @@ error_code sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
|
||||||
|
|
||||||
error_code sceNpManagerGetCachedInfo(CellSysutilUserId userId, vm::ptr<SceNpManagerCacheParam> param)
|
error_code sceNpManagerGetCachedInfo(CellSysutilUserId userId, vm::ptr<SceNpManagerCacheParam> param)
|
||||||
{
|
{
|
||||||
sceNp.todo("sceNpManagerGetCachedInfo(userId=%d, param=*0x%x)", userId, param);
|
sceNp.warning("sceNpManagerGetCachedInfo(userId=%d, param=*0x%x)", userId, param);
|
||||||
|
|
||||||
auto& nph = g_fxo->get<named_thread<np::np_handler>>();
|
auto& nph = g_fxo->get<named_thread<np::np_handler>>();
|
||||||
|
|
||||||
|
@ -3368,6 +3369,17 @@ error_code sceNpManagerGetCachedInfo(CellSysutilUserId userId, vm::ptr<SceNpMana
|
||||||
return SCE_NP_ERROR_INVALID_ARGUMENT;
|
return SCE_NP_ERROR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userId != CELL_SYSUTIL_USERID_CURRENT && userId != Emu.GetUsrId())
|
||||||
|
{
|
||||||
|
return CELL_ENOENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
param->size = sizeof(SceNpManagerCacheParam);
|
||||||
|
param->onlineId = nph.get_online_id();
|
||||||
|
param->npId = nph.get_npid();
|
||||||
|
param->onlineName = nph.get_online_name();
|
||||||
|
param->avatarUrl = nph.get_avatar_url();
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue