summaryrefslogtreecommitdiff
path: root/src/yuzu/game_list.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-07 20:22:39 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-07 20:27:51 -0400
commit5ac018d1dfa12ee4a657e2ec06d92fac17bbd611 (patch)
treefc0934fd35d42b307badb176bbb8f5d29d813325 /src/yuzu/game_list.cpp
parentdf91c9f5e68c253d5e60d26e8d35e6bc423f0571 (diff)
yuzu qt: Start games from context menu
This connects the BootGame function to the context menu. In addition, there is an option to boot without using the custom configuration.
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r--src/yuzu/game_list.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 9308cfef8..da956c99b 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -505,6 +505,10 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::string& path) {
QAction* favorite = context_menu.addAction(tr("Favorite"));
context_menu.addSeparator();
+ QAction* start_game = context_menu.addAction(tr("Start Game"));
+ QAction* start_game_global =
+ context_menu.addAction(tr("Start Game without Custom Configuration"));
+ context_menu.addSeparator();
QAction* open_save_location = context_menu.addAction(tr("Open Save Data Location"));
QAction* open_mod_location = context_menu.addAction(tr("Open Mod Data Location"));
QAction* open_transferable_shader_cache =
@@ -540,6 +544,12 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri
connect(open_save_location, &QAction::triggered, [this, program_id, path]() {
emit OpenFolderRequested(program_id, GameListOpenTarget::SaveData, path);
});
+ connect(start_game, &QAction::triggered, [this, path]() {
+ emit BootGame(QString::fromStdString(path), 0, StartGameType::Normal);
+ });
+ connect(start_game_global, &QAction::triggered, [this, path]() {
+ emit BootGame(QString::fromStdString(path), 0, StartGameType::Global);
+ });
connect(open_mod_location, &QAction::triggered, [this, program_id, path]() {
emit OpenFolderRequested(program_id, GameListOpenTarget::ModData, path);
});