From e6443ee4c93ef8a71b303823d84ee442e43dc87c Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Wed, 16 Jul 2025 11:03:18 +0200 Subject: [PATCH] If CONTENT_ID is empty in param.sfo, try using TITLE_ID as fallback --- src/emulator.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/emulator.cpp b/src/emulator.cpp index 480ceee0b..d7706fc70 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -100,8 +100,12 @@ void Emulator::Run(std::filesystem::path file, const std::vector ar const auto content_id = param_sfo->GetString("CONTENT_ID"); ASSERT_MSG(content_id.has_value(), "Failed to get CONTENT_ID"); - - id = std::string(*content_id, 7, 9); + const auto title_id = param_sfo->GetString("TITLE_ID"); + if (!content_id->empty()) { + id = std::string(*content_id, 7, 9); + } else if (content_id.has_value()) { + id = *title_id; + } title = param_sfo->GetString("TITLE").value_or("Unknown title"); fw_version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000); app_version = param_sfo->GetString("APP_VER").value_or("Unknown version");