diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp index 7fb4991cfb..e0f31d97a8 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp @@ -154,6 +154,28 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + const auto& sign = get_object(arg); + + // Format as a C byte array for ease of use + fmt::append(out, "{ "); + + for (std::size_t i = 0;; i++) + { + if (i == std::size(sign.data) - 1) + { + fmt::append(out, "0x%02X", sign.data[i]); + break; + } + + fmt::append(out, "0x%02X, ", sign.data[i]); + } + + fmt::append(out, " }"); +} + // Helpers static error_code NpTrophyGetTrophyInfo(const trophy_context_t* ctxt, s32 trophyId, SceNpTrophyDetails* details, SceNpTrophyData* data); @@ -331,6 +353,8 @@ error_code sceNpTrophyCreateContext(vm::ptr context, vm::cptrget(); std::scoped_lock lock(trophy_manager->mtx);