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,14 +193,12 @@ bool PSFLoader::LoadLibraryPSF(const std::string& path, bool use_pc_sp, Error* e
|
|||||||
const std::string lib_path = Path::BuildRelativePath(path, lib_name.value());
|
const std::string lib_path = Path::BuildRelativePath(path, lib_name.value());
|
||||||
INFO_LOG("Loading parent PSF '{}'", Path::GetFileName(lib_path));
|
INFO_LOG("Loading parent PSF '{}'", Path::GetFileName(lib_path));
|
||||||
|
|
||||||
// We should use the initial SP/PC from the **first** parent lib.
|
// We should use the initial SP/PC from the deepest **first** parent lib.
|
||||||
const bool lib_use_pc_sp = (depth == 0);
|
if (!LoadLibraryPSF(lib_path.c_str(), use_pc_sp, error, depth + 1))
|
||||||
if (!LoadLibraryPSF(lib_path.c_str(), lib_use_pc_sp, error, depth + 1))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Don't apply the PC/SP from the minipsf file.
|
// Don't apply the PC/SP from the minipsf file.
|
||||||
if (lib_use_pc_sp)
|
use_pc_sp = false;
|
||||||
use_pc_sp = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply the main psf
|
// apply the main psf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user