diff options
author | Mai M <mathew1800@gmail.com> | 2021-06-08 17:09:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 17:09:25 -0400 |
commit | f09c9b5fcc9b39f525d0a9a949ac0511392cb7bc (patch) | |
tree | 976e5895d552548bad0c7c5e7e141ed11af99874 /src/yuzu/main.cpp | |
parent | 3b5673daca37ab8628f0ea8d90902209c812fbcc (diff) | |
parent | 5ac018d1dfa12ee4a657e2ec06d92fac17bbd611 (diff) |
Merge pull request #6426 from lat9nq/context-menu-start
yuzu qt: Start games from context menu
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e683fb920..19339ff2d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1094,6 +1094,7 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) { } void GMainWindow::ConnectWidgetEvents() { + connect(game_list, &GameList::BootGame, this, &GMainWindow::BootGame); connect(game_list, &GameList::GameChosen, this, &GMainWindow::OnGameListLoadFile); connect(game_list, &GameList::OpenDirectory, this, &GMainWindow::OnGameListOpenDirectory); connect(game_list, &GameList::OpenFolderRequested, this, &GMainWindow::OnGameListOpenFolder); @@ -1320,7 +1321,7 @@ void GMainWindow::SelectAndSetCurrentUser() { Settings::values.current_user = dialog.GetIndex(); } -void GMainWindow::BootGame(const QString& filename, std::size_t program_index) { +void GMainWindow::BootGame(const QString& filename, std::size_t program_index, StartGameType type) { LOG_INFO(Frontend, "yuzu starting..."); StoreRecentFile(filename); // Put the filename on top of the list @@ -1332,7 +1333,8 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index) { const auto v_file = Core::GetGameFileFromPath(vfs, filename.toUtf8().constData()); const auto loader = Loader::GetLoader(system, v_file, program_index); - if (!(loader == nullptr || loader->ReadProgramId(title_id) != Loader::ResultStatus::Success)) { + if (loader != nullptr && loader->ReadProgramId(title_id) == Loader::ResultStatus::Success && + type == StartGameType::Normal) { // Load per game settings const auto file_path = std::filesystem::path{filename.toStdU16String()}; const auto config_file_name = title_id == 0 |