mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
If CONTENT_ID is empty in param.sfo, try using TITLE_ID as fallback (#3258)
* If CONTENT_ID is empty in param.sfo, try using TITLE_ID as fallback * Remove assert that is now not needed and fix me switching up variable names
This commit is contained in:
parent
aeab525a7f
commit
68b147488e
@ -99,9 +99,12 @@ void Emulator::Run(std::filesystem::path file, const std::vector<std::string> ar
|
|||||||
ASSERT_MSG(param_sfo->Open(param_sfo_path), "Failed to open param.sfo");
|
ASSERT_MSG(param_sfo->Open(param_sfo_path), "Failed to open param.sfo");
|
||||||
|
|
||||||
const auto content_id = param_sfo->GetString("CONTENT_ID");
|
const auto content_id = param_sfo->GetString("CONTENT_ID");
|
||||||
ASSERT_MSG(content_id.has_value(), "Failed to get CONTENT_ID");
|
const auto title_id = param_sfo->GetString("TITLE_ID");
|
||||||
|
if (content_id.has_value() && !content_id->empty()) {
|
||||||
id = std::string(*content_id, 7, 9);
|
id = std::string(*content_id, 7, 9);
|
||||||
|
} else if (title_id.has_value()) {
|
||||||
|
id = *title_id;
|
||||||
|
}
|
||||||
title = param_sfo->GetString("TITLE").value_or("Unknown title");
|
title = param_sfo->GetString("TITLE").value_or("Unknown title");
|
||||||
fw_version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000);
|
fw_version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000);
|
||||||
app_version = param_sfo->GetString("APP_VER").value_or("Unknown version");
|
app_version = param_sfo->GetString("APP_VER").value_or("Unknown version");
|
||||||
|
Loading…
Reference in New Issue
Block a user