mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-29 06:11:47 +00:00
PSFLoader: Fix recursive _lib loading (#3489)
This commit is contained in:
parent
46a071f3e7
commit
56b5b337aa
@ -193,13 +193,11 @@ bool PSFLoader::LoadLibraryPSF(const std::string& path, bool use_pc_sp, Error* e
|
||||
const std::string lib_path = Path::BuildRelativePath(path, lib_name.value());
|
||||
INFO_LOG("Loading parent PSF '{}'", Path::GetFileName(lib_path));
|
||||
|
||||
// We should use the initial SP/PC from the **first** parent lib.
|
||||
const bool lib_use_pc_sp = (depth == 0);
|
||||
if (!LoadLibraryPSF(lib_path.c_str(), lib_use_pc_sp, error, depth + 1))
|
||||
// We should use the initial SP/PC from the deepest **first** parent lib.
|
||||
if (!LoadLibraryPSF(lib_path.c_str(), use_pc_sp, error, depth + 1))
|
||||
return false;
|
||||
|
||||
// Don't apply the PC/SP from the minipsf file.
|
||||
if (lib_use_pc_sp)
|
||||
use_pc_sp = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user