1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Fix faulty GetScoreFriendsRequest

This commit is contained in:
RipleyTom 2022-09-28 10:57:19 +02:00 committed by Megamouse
parent 56caa10e56
commit d1a7bb0136
5 changed files with 12 additions and 12 deletions

View File

@ -4146,7 +4146,7 @@ error_code sceNpScoreRecordScoreAsync(s32 transId, SceNpScoreBoardId boardId, Sc
return scenp_score_record_score(transId, boardId, score, scoreComment, gameInfo, tmpRank, option, true);
}
error_code scenp_score_record_game_data(s32 transId, SceNpScoreBoardId boardId, SceNpScoreValue score, u64 totalSize, u64 sendSize, vm::cptr<void> data, vm::ptr<void> option, bool async)
error_code scenp_score_record_game_data(s32 transId, SceNpScoreBoardId /* boardId */, SceNpScoreValue /* score */, u64 /* totalSize */, u64 /* sendSize */, vm::cptr<void> data, vm::ptr<void> option, bool /* async */)
{
auto& nph = g_fxo->get<named_thread<np::np_handler>>();
@ -4194,7 +4194,7 @@ error_code sceNpScoreRecordGameDataAsync(s32 transId, SceNpScoreBoardId boardId,
return scenp_score_record_game_data(transId, boardId, score, totalSize, sendSize, data, option, true);
}
error_code scenp_score_get_game_data(s32 transId, SceNpScoreBoardId boardId, vm::cptr<SceNpId> npId, vm::ptr<u64> totalSize, u64 recvSize, vm::ptr<void> data, vm::ptr<void> option, bool async)
error_code scenp_score_get_game_data(s32 /* transId */, SceNpScoreBoardId /* boardId */, vm::cptr<SceNpId> npId, vm::ptr<u64> totalSize, u64 /* recvSize */, vm::ptr<void> data, vm::ptr<void> option, bool /* async */)
{
auto& nph = g_fxo->get<named_thread<np::np_handler>>();
@ -4239,7 +4239,7 @@ error_code sceNpScoreGetGameDataAsync(s32 transId, SceNpScoreBoardId boardId, vm
template <typename T>
error_code scenp_score_get_ranking_by_npid(s32 transId, SceNpScoreBoardId boardId, T npIdArray, u64 npIdArraySize, vm::ptr<SceNpScorePlayerRankData> rankArray, u64 rankArraySize,
vm::ptr<SceNpScoreComment> commentArray, u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate,
vm::ptr<SceNpScoreRankNumber> totalRecord, vm::ptr<void> option, bool async)
vm::ptr<SceNpScoreRankNumber> totalRecord, vm::ptr<void> /* option */, bool async)
{
auto& nph = g_fxo->get<named_thread<np::np_handler>>();
@ -4504,7 +4504,7 @@ error_code scenp_score_get_friends_ranking(s32 transId, SceNpScoreBoardId boardI
return SCE_NP_COMMUNITY_ERROR_INVALID_ONLINE_ID;
}
nph.get_score_friend(trans_ctx, boardId, rankArray, rankArraySize, commentArray, commentArraySize, infoArray, infoArraySize, arrayNum, lastSortDate, totalRecord, async);
nph.get_score_friend(trans_ctx, boardId, includeSelf, rankArray, rankArraySize, commentArray, commentArraySize, infoArray, infoArraySize, arrayNum, lastSortDate, totalRecord, async);
if (async)
{

View File

@ -159,7 +159,7 @@ namespace np
void record_score(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId board_id, SceNpScoreValue score, vm::cptr<SceNpScoreComment> comment, const u8* data, u32 data_size, vm::ptr<SceNpScoreRankNumber> tmp_rank, bool async);
void get_score_range(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, SceNpScoreRankNumber startSerialRank, vm::ptr<SceNpScoreRankData> rankArray, u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async);
void get_score_npid(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, const std::vector<std::pair<SceNpId, s32>>& npid_vec, vm::ptr<SceNpScorePlayerRankData> rankArray, u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async);
void get_score_friend(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, vm::ptr<SceNpScoreRankData> rankArray, u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async);
void get_score_friend(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, bool include_self, vm::ptr<SceNpScoreRankData> rankArray, u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async);
// Local functions
std::pair<error_code, std::optional<SceNpMatching2RoomSlotInfo>> local_get_room_slots(SceNpMatching2RoomId room_id);

View File

@ -867,11 +867,11 @@ namespace np
return true;
}
bool np_handler::reply_store_score_data(u32 req_id, std::vector<u8>& reply_data)
bool np_handler::reply_store_score_data(u32 /* req_id */, std::vector<u8>& /* reply_data */)
{
return true;
}
bool np_handler::reply_get_score_data(u32 req_id, std::vector<u8>& reply_data)
bool np_handler::reply_get_score_data(u32 /* req_id */, std::vector<u8>& /* reply_data */)
{
return true;
}
@ -1008,7 +1008,7 @@ namespace np
return handle_GetScoreResponse(req_id, reply_data);
}
void np_handler::get_score_friend(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, vm::ptr<SceNpScoreRankData> rankArray, [[maybe_unused]] u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, [[maybe_unused]] u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async)
void np_handler::get_score_friend(std::shared_ptr<score_transaction_ctx>& trans_ctx, SceNpScoreBoardId boardId, bool include_self, vm::ptr<SceNpScoreRankData> rankArray, [[maybe_unused]] u64 rankArraySize, vm::ptr<SceNpScoreComment> commentArray, [[maybe_unused]] u64 commentArraySize, vm::ptr<void> infoArray, u64 infoArraySize, u64 arrayNum, vm::ptr<CellRtcTick> lastSortDate, vm::ptr<SceNpScoreRankNumber> totalRecord, bool async)
{
std::unique_lock lock(trans_ctx->mutex);
u32 req_id = get_req_id(0x3334);
@ -1024,7 +1024,7 @@ namespace np
bool with_comments = !!commentArray;
bool with_gameinfo = !!infoArray;
rpcn->get_score_friend(req_id, trans_ctx->communicationId, boardId, with_comments, with_gameinfo);
rpcn->get_score_friend(req_id, trans_ctx->communicationId, boardId, include_self, with_comments, with_gameinfo, arrayNum);
return score_async_handler(std::move(lock), trans_ctx, req_id, async);
}

View File

@ -1824,11 +1824,11 @@ namespace rpcn
return forge_send(CommandType::GetScoreNpid, req_id, data);
}
bool rpcn_client::get_score_friend(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, bool with_comment, bool with_gameinfo)
bool rpcn_client::get_score_friend(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, bool include_self, bool with_comment, bool with_gameinfo, u32 max_entries)
{
std::vector<u8> data;
flatbuffers::FlatBufferBuilder builder(1024);
auto req_finished = CreateGetScoreFriendsRequest(builder, board_id, with_comment, with_gameinfo);
auto req_finished = CreateGetScoreFriendsRequest(builder, board_id, include_self, max_entries, with_comment, with_gameinfo);
builder.Finish(req_finished);
u8* buf = builder.GetBufferPointer();

View File

@ -367,7 +367,7 @@ namespace rpcn
bool record_score(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, SceNpScorePcId char_id, SceNpScoreValue score, const std::optional<std::string> comment, const std::optional<std::vector<u8>> score_data);
bool get_score_range(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, u32 start_rank, u32 num_rank, bool with_comment, bool with_gameinfo);
bool get_score_npid(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, const std::vector<std::pair<SceNpId, s32>>& npids, bool with_comment, bool with_gameinfo);
bool get_score_friend(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, bool with_comment, bool with_gameinfo);
bool get_score_friend(u32 req_id, const SceNpCommunicationId& communication_id, SceNpScoreBoardId board_id, bool include_self, bool with_comment, bool with_gameinfo, u32 max_entries);
const std::string& get_online_name() const
{