From 511e9920c2aa1b4a428894516cc950f15fa0ff4f Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 21 Sep 2020 11:04:11 +0200 Subject: [PATCH] patch_engine: Apply patch when APP_VER is unknown --- Utilities/bin_patch.cpp | 5 ----- Utilities/bin_patch.h | 3 --- rpcs3/Emu/System.cpp | 5 +++-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index e662b4c85e..57cbabb9c4 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -548,11 +548,6 @@ bool patch_engine::read_patch_node(patch_info& info, YAML::Node node, const YAML return is_valid; } -void patch_engine::append(const std::string& patch) -{ - load(m_map, patch); -} - void patch_engine::append_global_patches() { // Legacy patch.yml diff --git a/Utilities/bin_patch.h b/Utilities/bin_patch.h index db1784157e..688bdf31b5 100644 --- a/Utilities/bin_patch.h +++ b/Utilities/bin_patch.h @@ -138,9 +138,6 @@ public: std::size_t apply_with_ls_check(const std::string& name, u8* dst, u32 filesz, u32 ls_addr); private: - // Load from file and append to member patches map - void append(const std::string& path); - // Internal: Apply patch (returns the number of entries applied) template std::size_t apply_patch(const std::string& name, u8* dst, u32 filesz, u32 ls_addr); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index a844bd4b23..be15780c9c 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -923,8 +923,9 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool m_title_id = std::string(psf::get_string(_psf, "TITLE_ID")); m_cat = std::string(psf::get_string(_psf, "CATEGORY")); - m_app_version = std::string(psf::get_string(_psf, "APP_VER", "Unknown")); + const auto version_app = psf::get_string(_psf, "APP_VER", "Unknown"); const auto version_disc = psf::get_string(_psf, "VERSION", "Unknown"); + m_app_version = version_app == "Unknown" ? version_disc : version_app; if (!_psf.empty() && m_cat.empty()) { @@ -935,7 +936,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool sys_log.notice("Title: %s", GetTitle()); sys_log.notice("Serial: %s", GetTitleID()); sys_log.notice("Category: %s", GetCat()); - sys_log.notice("Version: %s / %s", GetAppVersion(), version_disc); + sys_log.notice("Version: APP_VER=%s VERSION=%s", version_app, version_disc); if (!add_only && !force_global_config && m_config_override_path.empty()) {