From 7b8bc901571eacf06d23046bbed0ea8ff87834b3 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 19 Sep 2024 18:46:07 +0300 Subject: [PATCH] MiscFixes11 (#984) * fixed an issue in sceSaveDataSetSaveDataMemory , makes chariot CUSA00739 goes ingame * added branch name into sdl window title --- src/core/libraries/save_data/savedata.cpp | 7 ++++--- src/emulator.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/libraries/save_data/savedata.cpp b/src/core/libraries/save_data/savedata.cpp index 52349b35..10a89f66 100644 --- a/src/core/libraries/save_data/savedata.cpp +++ b/src/core/libraries/save_data/savedata.cpp @@ -730,12 +730,13 @@ int PS4_SYSV_ABI sceSaveDataSetSaveDataMemory(const u32 userId, const void* buf, const size_t bufSize, const int64_t offset) { LOG_INFO(Lib_SaveData, "called"); const auto& mount_dir = Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) / - std::to_string(userId) / game_serial / "sdmemory/save_mem1.sav"; + std::to_string(userId) / game_serial / "sdmemory"; - Common::FS::IOFile file(mount_dir, Common::FS::FileAccessMode::Write); + Common::FS::IOFile file(mount_dir / "save_mem1.sav", Common::FS::FileAccessMode::Write); + if (!file.IsOpen()) + return -1; file.Seek(offset); file.WriteRaw(buf, bufSize); - return ORBIS_OK; } diff --git a/src/emulator.cpp b/src/emulator.cpp index cc9cbbd9..2d3460a7 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -141,8 +141,8 @@ void Emulator::Run(const std::filesystem::path& file) { if (Common::isRelease) { window_title = fmt::format("shadPS4 v{} | {}", Common::VERSION, game_title); } else { - window_title = - fmt::format("shadPS4 v{} {} | {}", Common::VERSION, Common::g_scm_desc, game_title); + window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::VERSION, Common::g_scm_branch, + Common::g_scm_desc, game_title); } window = std::make_unique( Config::getScreenWidth(), Config::getScreenHeight(), controller, window_title);