From f8097a428c851e1b35b0962e47bdda1bce5b0092 Mon Sep 17 00:00:00 2001 From: GitArUs Date: Sat, 6 Mar 2021 13:01:04 +0000 Subject: [PATCH] Allow games to list all savedata (#9547) * cellSaveData - allow games to list all savedata, not only those they own. Co-authored-by: Megamouse --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 8aa0ffe1ff..81702972bc 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -609,7 +609,13 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v listGet->dirList.set(setBuf->buf.addr()); std::memset(listGet->reserved, 0, sizeof(listGet->reserved)); - const auto prefix_list = fmt::split(setList->dirNamePrefix.get_ptr(), {"|"}); + auto prefix_list = fmt::split(setList->dirNamePrefix.get_ptr(), {"|"}); + + // if prefix_list is empty game wants to check all savedata + if (prefix_list.empty() && (operation == SAVEDATA_OP_LIST_LOAD || operation == SAVEDATA_OP_FIXED_LOAD)) + { + prefix_list = {""}; + } // get the saves matching the supplied prefix for (auto&& entry : fs::dir(base_dir))