sys/cellGame: Fix hdd game dir name

Some games are installed with other dir names than title_id
This commit is contained in:
Megamouse 2023-12-29 09:57:43 +01:00
parent b0c1684ff3
commit d3298c422b
2 changed files with 16 additions and 8 deletions

View file

@ -746,7 +746,7 @@ error_code cellGameBootCheck(vm::ptr<u32> type, vm::ptr<u32> attributes, vm::ptr
*attributes = 0; // TODO
sfo = psf::load_object(vfs::get(Emu.GetDir() + "PARAM.SFO"));
dir = Emu.GetTitleID();
dir = fmt::trim(Emu.GetDir().substr(fs::get_parent_dir_view(Emu.GetDir()).size() + 1), fs::delim);
}
*type = _type;
@ -763,7 +763,8 @@ error_code cellGameBootCheck(vm::ptr<u32> type, vm::ptr<u32> attributes, vm::ptr
if (_type == u32{CELL_GAME_GAMETYPE_HDD} && dirName)
{
strcpy_trunc(*dirName, Emu.GetTitleID());
ensure(dir.size() < CELL_GAME_DIRNAME_SIZE);
strcpy_trunc(*dirName, dir);
}
perm.dir = std::move(dir);