mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
sceNpTrophyRegisterContext: Fix off by one progress callbacks count
This commit is contained in:
parent
4421831c8b
commit
c1bdaccd8c
1 changed files with 3 additions and 3 deletions
|
@ -560,10 +560,10 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
||||||
}
|
}
|
||||||
|
|
||||||
// This emulates vsh sending the events and ensures that not 2 events are processed at once
|
// This emulates vsh sending the events and ensures that not 2 events are processed at once
|
||||||
const std::pair<u32, u32> statuses[] =
|
const std::pair<u32, s32> statuses[] =
|
||||||
{
|
{
|
||||||
{ SCE_NP_TROPHY_STATUS_PROCESSING_SETUP, 3 },
|
{ SCE_NP_TROPHY_STATUS_PROCESSING_SETUP, 3 },
|
||||||
{ SCE_NP_TROPHY_STATUS_PROCESSING_PROGRESS, tropusr->GetTrophiesCount() },
|
{ SCE_NP_TROPHY_STATUS_PROCESSING_PROGRESS, ::narrow<s32>(tropusr->GetTrophiesCount()) - 1 },
|
||||||
{ SCE_NP_TROPHY_STATUS_PROCESSING_FINALIZE, 4 },
|
{ SCE_NP_TROPHY_STATUS_PROCESSING_FINALIZE, 4 },
|
||||||
{ SCE_NP_TROPHY_STATUS_PROCESSING_COMPLETE, 0 }
|
{ SCE_NP_TROPHY_STATUS_PROCESSING_COMPLETE, 0 }
|
||||||
};
|
};
|
||||||
|
@ -578,7 +578,7 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
||||||
{
|
{
|
||||||
// One status max per cellSysutilCheckCallback call
|
// One status max per cellSysutilCheckCallback call
|
||||||
*queued += status.second;
|
*queued += status.second;
|
||||||
for (u32 completed = 0; completed <= status.second; completed++)
|
for (s32 completed = 0; completed <= status.second; completed++)
|
||||||
{
|
{
|
||||||
sysutil_register_cb([statusCb, status, context, completed, arg, wkptr](ppu_thread& cb_ppu) -> s32
|
sysutil_register_cb([statusCb, status, context, completed, arg, wkptr](ppu_thread& cb_ppu) -> s32
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue