ISO: Remove psf hack

This commit is contained in:
Megamouse 2026-01-10 12:35:19 +01:00
parent a8624682a7
commit f712de0c91
2 changed files with 3 additions and 4 deletions

View file

@ -257,6 +257,8 @@ namespace fs
// Open file with specified mode
explicit file(const std::string& path, bs_t<open_mode> mode = ::fs::read);
file(std::unique_ptr<file_base>&& ptr) : m_file(std::move(ptr)) {}
static file from_native_handle(native_handle handle);
// Open memory for read

View file

@ -348,10 +348,7 @@ psf::registry iso_archive::open_psf(const std::string& path)
auto* archive_file = retrieve(path);
if (!archive_file) return psf::registry();
// HACK: psf does not accept a file_base argument,
// instead we are creating a dummy fs::file and replacing the internal file_base handle with an iso_file
fs::file psf_file(path);
psf_file.reset(std::make_unique<iso_file>(fs::file(m_path), *archive_file));
const fs::file psf_file(std::make_unique<iso_file>(fs::file(m_path), *archive_file));
return psf::load_object(psf_file, path);
}