Use database per default, remove global

This commit is contained in:
Megamouse 2026-04-13 18:23:56 +02:00 committed by Ani
parent 50d6396f99
commit 1cdc401cc5
3 changed files with 7 additions and 23 deletions

View File

@ -174,10 +174,9 @@ void fmt_class_string<cfg_mode>::format(std::string& out, u64 arg)
{
case cfg_mode::custom: return "custom config";
case cfg_mode::custom_selection: return "custom config selection";
case cfg_mode::global: return "global config";
case cfg_mode::database_config: return "database config";
case cfg_mode::config_override: return "config override";
case cfg_mode::continuous: return "continuous config";
case cfg_mode::database_config: return "database config";
case cfg_mode::default_config: return "default config";
}
return unknown;

View File

@ -4,9 +4,8 @@ enum class cfg_mode
{
custom, // Prefer regular custom config. Fall back to global config.
custom_selection, // Use user-selected custom config. Fall back to global config.
global, // Use global config.
database_config, // Use database config. Fall back to global config.
config_override, // Use config override. This does not use the global VFS settings! Fall back to global config.
continuous, // Use same config as on last boot. Fall back to global config.
database_config, // Use database config. Fall back to global config.
default_config // Use the default values of the config entries.
};

View File

@ -66,10 +66,10 @@ void game_list_context_menu::show_single_selection_context_menu(const game_info&
const bool is_current_running_game = game_list_actions::IsGameRunning(serial);
// Make Actions
QAction* boot = new QAction((gameinfo->has_custom_config || gameinfo->has_database_config)
QAction* boot = new QAction(gameinfo->has_custom_config
? (is_current_running_game
? tr("&Reboot with Global Configuration")
: tr("&Boot with Global Configuration"))
? (gameinfo->has_database_config ? tr("&Reboot with Database + Global Configuration") : tr("&Reboot with Global Configuration"))
: (gameinfo->has_database_config ? tr("&Boot with Database + Global Configuration") : tr("&Boot with Global Configuration")))
: (is_current_running_game
? tr("&Reboot")
: tr("&Boot")));
@ -89,21 +89,7 @@ void game_list_context_menu::show_single_selection_context_menu(const game_info&
Q_EMIT m_game_list_frame->RequestBoot(gameinfo);
});
}
if (gameinfo->has_database_config)
{
QAction* boot_db = addAction(is_current_running_game
? tr("&Reboot with Database Configuration")
: tr("&Boot with Database Configuration"));
boot_db->setFont(font);
connect(boot_db, &QAction::triggered, m_game_list_frame, [this, gameinfo]
{
sys_log.notice("Booting from gamelist per context menu...");
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::database_config);
});
}
if (!gameinfo->has_custom_config && !gameinfo->has_database_config)
else
{
boot->setFont(font);
}
@ -616,7 +602,7 @@ void game_list_context_menu::show_single_selection_context_menu(const game_info&
connect(boot, &QAction::triggered, m_game_list_frame, [this, gameinfo]()
{
sys_log.notice("Booting from gamelist per context menu...");
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::global);
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::database_config);
});
const auto configure_game = [this, current_game, gameinfo](bool create_cfg_from_global_cfg, bool create_cfg_from_database)