From 7674c29c78c45f693c052a50a4ab2bf1e8c49538 Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Thu, 29 Feb 2024 13:22:59 +0100 Subject: [PATCH] Fix for sceNpScoreGetGameData --- rpcs3/Emu/Cell/Modules/sceNp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index 2c95da72b2..9f568624a6 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -5522,7 +5522,7 @@ error_code sceNpScorePollAsync(s32 transId, vm::ptr result) return CELL_OK; } -std::pair, std::shared_ptr> get_score_transaction_context(s32 transId) +std::pair, std::shared_ptr> get_score_transaction_context(s32 transId, bool reset_transaction = true) { auto trans_ctx = idm::get(transId); @@ -5531,6 +5531,7 @@ std::pair, std::shared_ptr> get return {SCE_NP_COMMUNITY_ERROR_INVALID_ID, {}}; } + if (reset_transaction) { // Check for games reusing score transaction context // Unsure about the actual behaviour, only one game does this afaik(Marvel vs Capcom Origins) @@ -5745,7 +5746,7 @@ error_code scenp_score_get_game_data(s32 transId, SceNpScoreBoardId boardId, vm: return SCE_NP_COMMUNITY_ERROR_INSUFFICIENT_ARGUMENT; } - auto [res, trans_ctx] = get_score_transaction_context(transId); + auto [res, trans_ctx] = get_score_transaction_context(transId, false); if (res) return *res;