From f712de0c917658c206649a0b6c2a71978e6038f2 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 10 Jan 2026 12:35:19 +0100 Subject: [PATCH] ISO: Remove psf hack --- Utilities/File.h | 2 ++ rpcs3/Loader/ISO.cpp | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Utilities/File.h b/Utilities/File.h index f7765507e8..7e6356da7b 100644 --- a/Utilities/File.h +++ b/Utilities/File.h @@ -257,6 +257,8 @@ namespace fs // Open file with specified mode explicit file(const std::string& path, bs_t mode = ::fs::read); + file(std::unique_ptr&& ptr) : m_file(std::move(ptr)) {} + static file from_native_handle(native_handle handle); // Open memory for read diff --git a/rpcs3/Loader/ISO.cpp b/rpcs3/Loader/ISO.cpp index 064bc48e61..7e3351cb0e 100644 --- a/rpcs3/Loader/ISO.cpp +++ b/rpcs3/Loader/ISO.cpp @@ -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(fs::file(m_path), *archive_file)); + const fs::file psf_file(std::make_unique(fs::file(m_path), *archive_file)); return psf::load_object(psf_file, path); }