Restore some /dev_flash logic

This commit is contained in:
Nekotekina 2020-02-20 12:43:53 +03:00
parent 92e3eaf3ff
commit da036de3e4
2 changed files with 38 additions and 36 deletions

View file

@ -116,6 +116,7 @@ void Emulator::Init()
const std::string dev_hdd0 = GetHddDir();
const std::string dev_hdd1 = fmt::replace_all(g_cfg.vfs.dev_hdd1, "$(EmulatorDir)", emu_dir);
const std::string dev_usb = fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir);
const std::string dev_flsh = fmt::replace_all(g_cfg.vfs.dev_flash, "$(EmulatorDir)", emu_dir);
auto make_path_verbose = [](const std::string& path)
{
@ -131,6 +132,7 @@ void Emulator::Init()
{
make_path_verbose(dev_hdd0);
make_path_verbose(dev_hdd1);
make_path_verbose(dev_flsh);
make_path_verbose(dev_usb);
make_path_verbose(dev_hdd0 + "game/");
make_path_verbose(dev_hdd0 + "game/TEST12345/");
@ -835,7 +837,7 @@ void Emulator::Load(const std::string& title_id, bool add_only, bool force_globa
// Mount default relative path to non-existent directory
vfs::mount("/dev_hdd0", fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir));
vfs::mount("/dev_flash", g_cfg.vfs.get_dev_flash());
vfs::mount("/dev_flash", fmt::replace_all(g_cfg.vfs.dev_flash, "$(EmulatorDir)", emu_dir));
vfs::mount("/dev_usb", fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir));
vfs::mount("/dev_usb000", fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir));
vfs::mount("/app_home", home_dir.empty() ? elf_dir + '/' : fmt::replace_all(home_dir, "$(EmulatorDir)", emu_dir));

View file

@ -70,7 +70,7 @@ struct cfg_root : cfg::node
cfg::string emulator_dir{ this, "$(EmulatorDir)" }; // Default (empty): taken from fs::get_config_dir()
cfg::string dev_hdd0{ this, "/dev_hdd0/", "$(EmulatorDir)dev_hdd0/" };
cfg::string dev_hdd1{ this, "/dev_hdd1/", "$(EmulatorDir)dev_hdd1/" };
cfg::string dev_flash{ this, "/dev_flash/" };
cfg::string dev_flash{ this, "/dev_flash/", "$(EmulatorDir)dev_flash/" };
cfg::string dev_usb000{ this, "/dev_usb000/", "$(EmulatorDir)dev_usb000/" };
cfg::string dev_bdvd{ this, "/dev_bdvd/" }; // Not mounted
cfg::string app_home{ this, "/app_home/" }; // Not mounted