mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
optimize add_only boot process
No need for hardcore stuff while adding games to the list
This commit is contained in:
parent
6ed9251f44
commit
89942ed92a
2 changed files with 16 additions and 9 deletions
|
@ -121,7 +121,7 @@ void fmt_class_string<game_boot_result>::format(std::string& out, u64 arg)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Emulator::Init()
|
void Emulator::Init(bool add_only)
|
||||||
{
|
{
|
||||||
jit_runtime::initialize();
|
jit_runtime::initialize();
|
||||||
|
|
||||||
|
@ -243,6 +243,16 @@ void Emulator::Init()
|
||||||
make_path_verbose(dev_hdd1 + "caches/");
|
make_path_verbose(dev_hdd1 + "caches/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
make_path_verbose(fs::get_cache_dir() + "shaderlog/");
|
||||||
|
make_path_verbose(fs::get_cache_dir() + "spu_progs/");
|
||||||
|
make_path_verbose(fs::get_config_dir() + "captures/");
|
||||||
|
|
||||||
|
if (add_only)
|
||||||
|
{
|
||||||
|
// We don't need to initialize the rest if we only add games
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Log user
|
// Log user
|
||||||
if (m_usr.empty())
|
if (m_usr.empty())
|
||||||
{
|
{
|
||||||
|
@ -312,9 +322,9 @@ void Emulator::Init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
make_path_verbose(fs::get_cache_dir() + "shaderlog/");
|
// Limit cache size
|
||||||
make_path_verbose(fs::get_config_dir() + "captures/");
|
if (g_cfg.vfs.limit_cache_size)
|
||||||
make_path_verbose(fs::get_cache_dir() + "spu_progs/");
|
LimitCacheSize();
|
||||||
|
|
||||||
// Initialize patch engine
|
// Initialize patch engine
|
||||||
g_fxo->init<patch_engine>()->append_global_patches();
|
g_fxo->init<patch_engine>()->append_global_patches();
|
||||||
|
@ -666,9 +676,6 @@ void Emulator::LimitCacheSize()
|
||||||
|
|
||||||
game_boot_result Emulator::BootGame(const std::string& path, const std::string& title_id, bool direct, bool add_only, bool force_global_config)
|
game_boot_result Emulator::BootGame(const std::string& path, const std::string& title_id, bool direct, bool add_only, bool force_global_config)
|
||||||
{
|
{
|
||||||
if (g_cfg.vfs.limit_cache_size)
|
|
||||||
LimitCacheSize();
|
|
||||||
|
|
||||||
if (!fs::exists(path))
|
if (!fs::exists(path))
|
||||||
{
|
{
|
||||||
return game_boot_result::invalid_file_or_folder;
|
return game_boot_result::invalid_file_or_folder;
|
||||||
|
@ -905,7 +912,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Init();
|
Init(add_only);
|
||||||
|
|
||||||
// Load game list (maps ABCD12345 IDs to /dev_bdvd/ locations)
|
// Load game list (maps ABCD12345 IDs to /dev_bdvd/ locations)
|
||||||
YAML::Node games;
|
YAML::Node games;
|
||||||
|
|
|
@ -122,7 +122,7 @@ public:
|
||||||
m_state = system_state::running;
|
m_state = system_state::running;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init();
|
void Init(bool add_only = false);
|
||||||
|
|
||||||
std::vector<std::string> argv;
|
std::vector<std::string> argv;
|
||||||
std::vector<std::string> envp;
|
std::vector<std::string> envp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue