Hotfix sceNpTrophyGetTrophyUnlockState

This commit is contained in:
Eladash 2019-12-17 19:21:29 +02:00 committed by Megamouse
parent e380a8c279
commit 8d955cfb8c
2 changed files with 5 additions and 2 deletions

View file

@ -757,11 +757,14 @@ error_code sceNpTrophyGetTrophyUnlockState(u32 context, u32 handle, vm::ptr<SceN
return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE; return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE;
} }
u32 count_ = ctxt->tropusr->GetTrophiesCount(); const u32 count_ = ctxt->tropusr->GetTrophiesCount();
*count = count_; *count = count_;
if (count_ > 128) if (count_ > 128)
sceNpTrophy.error("sceNpTrophyGetTrophyUnlockState: More than 128 trophies detected!"); sceNpTrophy.error("sceNpTrophyGetTrophyUnlockState: More than 128 trophies detected!");
// Needs hw testing
*flags = {};
// Pack up to 128 bools in u32 flag_bits[4] // Pack up to 128 bools in u32 flag_bits[4]
for (u32 id = 0; id < count_; id++) for (u32 id = 0; id < count_; id++)
{ {

View file

@ -122,7 +122,7 @@ struct SceNpTrophyData
struct SceNpTrophyFlagArray struct SceNpTrophyFlagArray
{ {
u32 flag_bits[SCE_NP_TROPHY_FLAG_SETSIZE >> SCE_NP_TROPHY_FLAG_BITS_SHIFT]; be_t<u32> flag_bits[SCE_NP_TROPHY_FLAG_SETSIZE >> SCE_NP_TROPHY_FLAG_BITS_SHIFT];
}; };
enum enum