Fix iso shortcuts

This commit is contained in:
Megamouse
2026-03-15 16:19:45 +01:00
parent 5714eb0ba5
commit 433816148a
2 changed files with 28 additions and 15 deletions
+11 -3
View File
@@ -1334,13 +1334,13 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
else if (m_path.starts_with(game_id_boot_prefix))
{
// Try to boot a game through game ID only
m_title_id = m_path.substr(game_id_boot_prefix.size());
m_title_id = m_title_id.substr(0, m_title_id.find_first_of(fs::delim));
const std::string_view boot_suffix = std::string_view(m_path).substr(game_id_boot_prefix.size());
m_title_id = boot_suffix.substr(0, boot_suffix.find_first_of(fs::delim));
if (m_title_id.size() < 3 && m_title_id.find_first_not_of('.') == umax)
{
// Do not allow if TITLE_ID result in path redirection
sys_log.fatal("Game directory not found using GAMEID token. ('%s')", m_title_id);
sys_log.fatal("Game directory not found using GAMEID token. (m_path='%s', title_id='%s')", m_title_id);
return game_boot_result::invalid_file_or_folder;
}
@@ -1361,6 +1361,13 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
title_path = std::move(game_path);
}
if (is_file_iso(title_path))
{
m_path = std::move(title_path);
ok = true;
}
else
{
for (std::string test_path :
{
rpcs3::utils::get_hdd0_dir() + "game/" + m_title_id + "/USRDIR/EBOOT.BIN"
@@ -1376,6 +1383,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
break;
}
}
}
if (!ok)
{
+6 -1
View File
@@ -7,6 +7,7 @@
#include "progress_dialog.h"
#include "Utilities/File.h"
#include "Loader/ISO.h"
#include "Emu/System.h"
#include "Emu/system_utils.hpp"
@@ -1460,7 +1461,11 @@ void game_list_actions::CreateShortcuts(const std::vector<game_info>& games, con
const std::string dev_flash = g_cfg_vfs.get_dev_flash();
if (gameinfo->info.category == "DG" && !fs::is_file(rpcs3::utils::get_hdd0_dir() + "/game/" + gameinfo->info.serial + "/USRDIR/EBOOT.BIN"))
if (is_file_iso(gameinfo->info.path))
{
gameid_token_value = gameinfo->info.serial;
}
else if (gameinfo->info.category == "DG" && !fs::is_file(rpcs3::utils::get_hdd0_dir() + "/game/" + gameinfo->info.serial + "/USRDIR/EBOOT.BIN"))
{
const usz ps3_game_dir_pos = fs::get_parent_dir(gameinfo->info.path).size();
std::string relative_boot_dir = gameinfo->info.path.substr(ps3_game_dir_pos);