mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Automatic dev_* dir creation
This commit is contained in:
parent
baf22527b0
commit
dac72ff371
2
bin/dev_hdd1/.gitignore
vendored
2
bin/dev_hdd1/.gitignore
vendored
@ -2,5 +2,3 @@
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
!cache
|
||||
!cache/README.txt
|
1
bin/dev_hdd1/cache/README.txt
vendored
1
bin/dev_hdd1/cache/README.txt
vendored
@ -1 +0,0 @@
|
||||
This directory is used for cache functionality, so don't store any data here.
|
@ -1 +0,0 @@
|
||||
This directory is used for temporary gamedata functionality, so don't store any data here.
|
@ -85,6 +85,28 @@ void Emulator::Init()
|
||||
// Reload global configuration
|
||||
cfg::root.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
|
||||
|
||||
// Create directories
|
||||
const std::string emu_dir_ = g_cfg_vfs_emulator_dir;
|
||||
const std::string emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
||||
const std::string dev_hdd0 = fmt::replace_all(g_cfg_vfs_dev_hdd0, "$(EmulatorDir)", emu_dir);
|
||||
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);
|
||||
|
||||
fs::create_path(dev_hdd0);
|
||||
fs::create_dir(dev_hdd0 + "game/");
|
||||
fs::create_dir(dev_hdd0 + "game/TEST12345/");
|
||||
fs::create_dir(dev_hdd0 + "game/TEST12345/USRDIR/");
|
||||
fs::create_dir(dev_hdd0 + "home/");
|
||||
fs::create_dir(dev_hdd0 + "home/00000001/");
|
||||
fs::create_dir(dev_hdd0 + "home/00000001/exdata/");
|
||||
fs::create_dir(dev_hdd0 + "home/00000001/savedata/");
|
||||
fs::create_dir(dev_hdd0 + "home/00000001/trophy/");
|
||||
if (fs::file f{dev_hdd0 + "home/00000001/localusername", fs::create + fs::excl + fs::write}) f.write("User"s);
|
||||
fs::create_dir(dev_hdd1 + "cache/");
|
||||
fs::create_dir(dev_hdd1 + "game/");
|
||||
fs::create_path(dev_hdd1);
|
||||
fs::create_path(dev_usb);
|
||||
|
||||
SetCPUThreadStop(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user