diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 16e01af592..5ab5e16b61 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -894,7 +894,7 @@ void game_list_frame::ItemSelectionChangedSlot() Q_EMIT NotifyGameSelection(game); } -void game_list_frame::CreateShortcuts(const game_info& gameinfo, std::vector locations) +void game_list_frame::CreateShortcuts(const game_info& gameinfo, const std::set& locations) { if (locations.empty()) { @@ -980,13 +980,18 @@ void game_list_frame::CreateShortcuts(const game_info& gameinfo, std::vector 1 || !locations.contains(gui::utils::shortcut_location::rpcs3_shortcuts)) +#endif { - QMessageBox::information(this, tr("Success!"), tr("Successfully created shortcut(s).")); - } - else - { - QMessageBox::warning(this, tr("Warning!"), tr("Failed to create shortcut(s)!")); + if (success) + { + QMessageBox::information(this, tr("Success!"), tr("Successfully created shortcut(s).")); + } + else + { + QMessageBox::warning(this, tr("Warning!"), tr("Failed to create shortcut(s)!")); + } } } diff --git a/rpcs3/rpcs3qt/game_list_frame.h b/rpcs3/rpcs3qt/game_list_frame.h index ae79658dcf..fdba6d56e9 100644 --- a/rpcs3/rpcs3qt/game_list_frame.h +++ b/rpcs3/rpcs3qt/game_list_frame.h @@ -62,7 +62,7 @@ public: // Returns the visible version string in the game list static std::string GetGameVersion(const game_info& game); - void CreateShortcuts(const game_info& gameinfo, std::vector locations); + void CreateShortcuts(const game_info& gameinfo, const std::set& locations); public Q_SLOTS: void BatchCreatePPUCaches(); diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 4eaec06b80..a593c01398 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -997,17 +997,17 @@ void main_window::HandlePackageInstallation(QStringList file_paths) dlg->exec(); } - std::vector locations; + std::set locations; #ifdef _WIN32 - locations.push_back(gui::utils::shortcut_location::rpcs3_shortcuts); + locations.insert(gui::utils::shortcut_location::rpcs3_shortcuts); #endif if (create_desktop_shortcuts) { - locations.push_back(gui::utils::shortcut_location::desktop); + locations.insert(gui::utils::shortcut_location::desktop); } if (create_app_shortcut) { - locations.push_back(gui::utils::shortcut_location::applications); + locations.insert(gui::utils::shortcut_location::applications); } for (const auto& [boot_path, title_id] : bootable_paths_installed)