mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 18:58:36 +12:00
Reimplement config selection for game startup
* Implement manual selection of config file. * Implement default config option. * Fix bug which led to 'force global config' to not work in some games. (any game using process relaunch such most game collections, RDR, MGS4 etc) * Relax CLI config purpose - instead the emulator forever ignoring any other config except for the one provided in arg, use it only for the CLI-booted game.
This commit is contained in:
parent
df080fbc53
commit
1cbcf7e1ad
8 changed files with 102 additions and 53 deletions
|
@ -941,6 +941,36 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
}
|
||||
|
||||
menu.addAction(boot);
|
||||
|
||||
{
|
||||
QAction* boot_default = menu.addAction(is_current_running_game
|
||||
? tr("&Reboot with default configuration")
|
||||
: tr("&Boot with default configuration"));
|
||||
|
||||
connect(boot_default, &QAction::triggered, [this, gameinfo]
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT RequestBoot(gameinfo, cfg_keys::_default);
|
||||
});
|
||||
|
||||
QAction* boot_manual = menu.addAction(is_current_running_game
|
||||
? tr("&Reboot with manually selected configuration")
|
||||
: tr("&Boot with manually selected configuration"));
|
||||
|
||||
connect(boot_manual, &QAction::triggered, [this, gameinfo]
|
||||
{
|
||||
if (std::string file_path = sstr(QFileDialog::getOpenFileName(this, "Select Config File", "", tr("Config Files (*.yml);;All files (*.*)"))); !file_path.empty())
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT RequestBoot(gameinfo, file_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_log.notice("Manual config selection aborted.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* configure = menu.addAction(gameinfo->hasCustomConfig
|
||||
|
@ -1191,7 +1221,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
connect(boot, &QAction::triggered, this, [this, gameinfo]()
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT RequestBoot(gameinfo, gameinfo->hasCustomConfig);
|
||||
Q_EMIT RequestBoot(gameinfo, cfg_keys::global);
|
||||
});
|
||||
connect(configure, &QAction::triggered, this, [this, current_game, gameinfo]()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue