ISO: Unload the iso_device on shutdown
This commit is contained in:
@@ -3886,6 +3886,7 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
|
|||||||
disc.clear();
|
disc.clear();
|
||||||
klic.clear();
|
klic.clear();
|
||||||
hdd1.clear();
|
hdd1.clear();
|
||||||
|
unload_iso();
|
||||||
init_mem_containers = nullptr;
|
init_mem_containers = nullptr;
|
||||||
m_config_path.clear();
|
m_config_path.clear();
|
||||||
m_config_mode = cfg_mode::custom;
|
m_config_mode = cfg_mode::custom;
|
||||||
|
|||||||
@@ -602,9 +602,12 @@ void iso_dir::rewind()
|
|||||||
|
|
||||||
void load_iso(const std::string& path)
|
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",
|
fs::set_virtual_device("iso_overlay_fs_dev",
|
||||||
stx::make_shared<iso_device>(path));
|
stx::make_shared<iso_device>(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unload_iso()
|
||||||
|
{
|
||||||
|
fs::set_virtual_device("iso_overlay_fs_dev",
|
||||||
|
stx::shared_ptr<iso_device>());
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ bool is_file_iso(const std::string& path);
|
|||||||
bool is_file_iso(const fs::file& path);
|
bool is_file_iso(const fs::file& path);
|
||||||
|
|
||||||
void load_iso(const std::string& path);
|
void load_iso(const std::string& path);
|
||||||
|
void unload_iso();
|
||||||
|
|
||||||
struct iso_extent_info
|
struct iso_extent_info
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user