ISO: Unload the iso_device on shutdown

This commit is contained in:
Functionable 2025-12-13 14:02:09 +00:00
parent 811de2fc50
commit 3de79f3595
3 changed files with 8 additions and 3 deletions

View File

@ -3886,6 +3886,7 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
disc.clear();
klic.clear();
hdd1.clear();
unload_iso();
init_mem_containers = nullptr;
m_config_path.clear();
m_config_mode = cfg_mode::custom;

View File

@ -602,9 +602,12 @@ void iso_dir::rewind()
void load_iso(const std::string& path)
{
fs::set_virtual_device("iso_overlay_fs_dev",
stx::shared_ptr<iso_device>());
fs::set_virtual_device("iso_overlay_fs_dev",
stx::make_shared<iso_device>(path));
}
void unload_iso()
{
fs::set_virtual_device("iso_overlay_fs_dev",
stx::shared_ptr<iso_device>());
}

View File

@ -7,6 +7,7 @@ bool is_file_iso(const std::string& path);
bool is_file_iso(const fs::file& path);
void load_iso(const std::string& path);
void unload_iso();
struct iso_extent_info
{