mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-09 08:35:03 -06:00
Add some more logging for use of database config
This commit is contained in:
parent
79d0e0eb3c
commit
7bc08d05c6
@ -935,6 +935,8 @@ game_boot_result Emulator::GetElfPathFromDir(std::string& elf_path, const std::s
|
|||||||
|
|
||||||
game_boot_result Emulator::BootGame(const std::string& path, const std::string& title_id, bool direct, cfg_mode config_mode, const std::string& config_path, const std::optional<std::string>& db_config)
|
game_boot_result Emulator::BootGame(const std::string& path, const std::string& title_id, bool direct, cfg_mode config_mode, const std::string& config_path, const std::optional<std::string>& db_config)
|
||||||
{
|
{
|
||||||
|
sys_log.notice("Emulator::BootGame: path='%s', title_id='%s', direct=%d, config_mode='%s', config_path='%s', db_config=(set=%d, valid=%d)", path, title_id, direct, config_mode, config_path, db_config.has_value(), db_config && !db_config->empty());
|
||||||
|
|
||||||
if (m_restrict_emu_state_change)
|
if (m_restrict_emu_state_change)
|
||||||
{
|
{
|
||||||
return game_boot_result::currently_restricted;
|
return game_boot_result::currently_restricted;
|
||||||
@ -1625,7 +1627,13 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
|||||||
{
|
{
|
||||||
g_cfg.name = config_path;
|
g_cfg.name = config_path;
|
||||||
m_config_path = config_path;
|
m_config_path = config_path;
|
||||||
m_add_database_config = false; // A custom config exists. Do not add the database config.
|
|
||||||
|
if (m_add_database_config)
|
||||||
|
{
|
||||||
|
// A custom config exists. Do not add the database config.
|
||||||
|
sys_log.notice("Found custom config. Ignoring database config");
|
||||||
|
m_add_database_config = false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -412,16 +412,22 @@ EmuCallbacks main_application::CreateCallbacks()
|
|||||||
|
|
||||||
callbacks.get_database_config = [](const std::string& title_id)
|
callbacks.get_database_config = [](const std::string& title_id)
|
||||||
{
|
{
|
||||||
if (title_id.empty())
|
|
||||||
return std::string();
|
|
||||||
|
|
||||||
sys_log.notice("Trying to retrieve database config for: '%s'", title_id);
|
sys_log.notice("Trying to retrieve database config for: '%s'", title_id);
|
||||||
|
|
||||||
|
if (title_id.empty())
|
||||||
|
{
|
||||||
|
sys_log.warning("Cannot retrieve database config for empty title_id");
|
||||||
|
return std::string();
|
||||||
|
}
|
||||||
|
|
||||||
config_database config_db(nullptr);
|
config_database config_db(nullptr);
|
||||||
config_db.request_config_database(false);
|
config_db.request_config_database(false);
|
||||||
|
|
||||||
if (!config_db.has_config(title_id))
|
if (!config_db.has_config(title_id))
|
||||||
|
{
|
||||||
|
sys_log.notice("Cannot find database config for: '%s'", title_id);
|
||||||
return std::string();
|
return std::string();
|
||||||
|
}
|
||||||
|
|
||||||
if (const auto config = config_db.get_config(title_id))
|
if (const auto config = config_db.get_config(title_id))
|
||||||
{
|
{
|
||||||
@ -429,6 +435,7 @@ EmuCallbacks main_application::CreateCallbacks()
|
|||||||
return config.value();
|
return config.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sys_log.error("Failed to retrieve database config for: '%s'", title_id);
|
||||||
return std::string();
|
return std::string();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -569,6 +569,7 @@ void main_window::Boot(const std::string& path, const std::string& title_id, boo
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gui_log.notice("Found database config for: '%s'", title_id);
|
||||||
db_config = *config;
|
db_config = *config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user