From dc3ab91a76c9359201c7cd43d23c51e47505b39e Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 30 May 2024 07:12:02 +0300 Subject: [PATCH] fixed sonic mania savedata --- src/core/libraries/save_data/savedata.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/libraries/save_data/savedata.cpp b/src/core/libraries/save_data/savedata.cpp index e63f9c1d..b7e63470 100644 --- a/src/core/libraries/save_data/savedata.cpp +++ b/src/core/libraries/save_data/savedata.cpp @@ -372,6 +372,18 @@ s32 PS4_SYSV_ABI sceSaveDataMount2(const OrbisSaveDataMount2* mount, mount_result->mount_status = 1; strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16); } break; + case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE2 | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | + ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: { + if (!std::filesystem::exists(mount_dir)) { + std::filesystem::create_directories(mount_dir); + } + + auto* mnt = Common::Singleton::Instance(); + mnt->Mount(mount_dir, g_mount_point); + + mount_result->mount_status = 1; + strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16); + } break; default: UNREACHABLE(); }