From 7f92d6003d5766e1c699f9ee43d65d57ce78b727 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi <18193363+elad335@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:08:11 +0300 Subject: [PATCH] sceNp: Silence a few functions --- rpcs3/Emu/Cell/Modules/sceNp.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index 8e2f962866..cedd5343f7 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -3835,9 +3835,11 @@ error_code sceNpManagerGetNpId(vm::ptr npId) return CELL_OK; } -error_code sceNpManagerGetOnlineName(vm::ptr onlineName) +error_code sceNpManagerGetOnlineName(ppu_thread& ppu, vm::ptr onlineName) { - sceNp.warning("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName); + ppu.state += cpu_flag::wait; + + sceNp.trace("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName); auto& nph = g_fxo->get>(); @@ -3861,14 +3863,17 @@ error_code sceNpManagerGetOnlineName(vm::ptr onlineName) return SCE_NP_ERROR_INVALID_STATE; } - memcpy(onlineName.get_ptr(), &nph.get_online_name(), onlineName.size()); + ppu.check_state(); + std::memcpy(onlineName.get_ptr(), &nph.get_online_name(), onlineName.size()); return CELL_OK; } -error_code sceNpManagerGetAvatarUrl(vm::ptr avatarUrl) +error_code sceNpManagerGetAvatarUrl(ppu_thread& ppu, vm::ptr avatarUrl) { - sceNp.warning("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl); + ppu.state += cpu_flag::wait; + + sceNp.trace("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl); auto& nph = g_fxo->get>(); @@ -3892,7 +3897,8 @@ error_code sceNpManagerGetAvatarUrl(vm::ptr avatarUrl) return SCE_NP_ERROR_INVALID_STATE; } - memcpy(avatarUrl.get_ptr(), &nph.get_avatar_url(), avatarUrl.size()); + ppu.check_state(); + std::memcpy(avatarUrl.get_ptr(), &nph.get_avatar_url(), avatarUrl.size()); return CELL_OK; }