mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Fix default renderer when creating a brand new config
This commit is contained in:
parent
41d38975f7
commit
db029ed29f
1 changed files with 8 additions and 8 deletions
|
@ -265,14 +265,6 @@ void Emulator::Init()
|
||||||
g_cfg.from_default();
|
g_cfg.from_default();
|
||||||
g_cfg.name.clear();
|
g_cfg.name.clear();
|
||||||
|
|
||||||
const std::string cfg_path = fs::get_config_dir() + "/config.yml";
|
|
||||||
|
|
||||||
// Save new global config if it doesn't exist or is empty
|
|
||||||
if (fs::stat_t info{}; !fs::stat(cfg_path, info) || info.size == 0)
|
|
||||||
{
|
|
||||||
Emulator::SaveSettings(g_cfg.to_string(), {});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not all renderers are known at compile time, so set a provided default if possible
|
// Not all renderers are known at compile time, so set a provided default if possible
|
||||||
if (m_default_renderer == video_renderer::vulkan && !m_default_graphics_adapter.empty())
|
if (m_default_renderer == video_renderer::vulkan && !m_default_graphics_adapter.empty())
|
||||||
{
|
{
|
||||||
|
@ -282,6 +274,14 @@ void Emulator::Init()
|
||||||
|
|
||||||
g_cfg_defaults = g_cfg.to_string();
|
g_cfg_defaults = g_cfg.to_string();
|
||||||
|
|
||||||
|
const std::string cfg_path = fs::get_config_dir() + "/config.yml";
|
||||||
|
|
||||||
|
// Save new global config if it doesn't exist or is empty
|
||||||
|
if (fs::stat_t info{}; !fs::stat(cfg_path, info) || info.size == 0)
|
||||||
|
{
|
||||||
|
Emulator::SaveSettings(g_cfg_defaults, {});
|
||||||
|
}
|
||||||
|
|
||||||
// Load VFS config
|
// Load VFS config
|
||||||
g_cfg_vfs.load();
|
g_cfg_vfs.load();
|
||||||
sys_log.notice("Using VFS config:\n%s", g_cfg_vfs.to_string());
|
sys_log.notice("Using VFS config:\n%s", g_cfg_vfs.to_string());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue