diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 51571e4d68..3e5d9b4d4f 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -1356,6 +1356,11 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point) connect(menu.addAction(tr("Reset Play Time")), &QAction::triggered, [this, entry]() { clearGameListEntryPlayTime(entry); }); + if (!entry->serial.empty()) + { + connect(menu.addAction(tr("Check Wiki Page")), &QAction::triggered, [this, entry]() { goToWikiPage(entry); }); + } + menu.addSeparator(); if (!s_vm_valid) @@ -2719,6 +2724,11 @@ void MainWindow::clearGameListEntryPlayTime(const GameList::Entry* entry) m_game_list_widget->refresh(false); } +void MainWindow::goToWikiPage(const GameList::Entry* entry) +{ + QtUtils::OpenURL(this, fmt::format("https://wiki.pcsx2.net/{}", entry->serial).c_str()); +} + std::optional MainWindow::promptForResumeState(const QString& save_state_path) { if (save_state_path.isEmpty()) diff --git a/pcsx2-qt/MainWindow.h b/pcsx2-qt/MainWindow.h index d4a1815312..9baf1382a6 100644 --- a/pcsx2-qt/MainWindow.h +++ b/pcsx2-qt/MainWindow.h @@ -267,6 +267,7 @@ private: const GameList::Entry* entry, std::optional save_slot = std::nullopt, std::optional fast_boot = std::nullopt); void setGameListEntryCoverImage(const GameList::Entry* entry); void clearGameListEntryPlayTime(const GameList::Entry* entry); + void goToWikiPage(const GameList::Entry* entry); std::optional promptForResumeState(const QString& save_state_path); void loadSaveStateSlot(s32 slot); diff --git a/pcsx2-qt/Settings/GameSummaryWidget.cpp b/pcsx2-qt/Settings/GameSummaryWidget.cpp index 5c768a8ba4..f181693853 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.cpp +++ b/pcsx2-qt/Settings/GameSummaryWidget.cpp @@ -49,11 +49,13 @@ GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindo connect(m_ui.inputProfile, &QComboBox::currentIndexChanged, this, &GameSummaryWidget::onInputProfileChanged); connect(m_ui.verify, &QAbstractButton::clicked, this, &GameSummaryWidget::onVerifyClicked); connect(m_ui.searchHash, &QAbstractButton::clicked, this, &GameSummaryWidget::onSearchHashClicked); + connect(m_ui.checkWiki, &QAbstractButton::clicked, this, [this, entry]() { onCheckWikiClicked(entry); }); bool has_custom_title = false, has_custom_region = false; GameList::CheckCustomAttributesForPath(m_entry_path, has_custom_title, has_custom_region); m_ui.restoreTitle->setEnabled(has_custom_title); m_ui.restoreRegion->setEnabled(has_custom_region); + m_ui.checkWiki->setEnabled(!entry->serial.empty()); } GameSummaryWidget::~GameSummaryWidget() = default; @@ -348,6 +350,11 @@ void GameSummaryWidget::onSearchHashClicked() QtUtils::OpenURL(this, fmt::format("http://redump.org/discs/quicksearch/{}", m_redump_search_keyword).c_str()); } +void GameSummaryWidget::onCheckWikiClicked(const GameList::Entry* entry) +{ + QtUtils::OpenURL(this, fmt::format("https://wiki.pcsx2.net/{}", entry->serial).c_str()); +} + void GameSummaryWidget::setVerifyResult(QString error) { m_ui.verify->setVisible(false); diff --git a/pcsx2-qt/Settings/GameSummaryWidget.h b/pcsx2-qt/Settings/GameSummaryWidget.h index ff8684ae67..2b87b84e17 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.h +++ b/pcsx2-qt/Settings/GameSummaryWidget.h @@ -28,6 +28,7 @@ private Q_SLOTS: void onDiscPathBrowseClicked(); void onVerifyClicked(); void onSearchHashClicked(); + void onCheckWikiClicked(const GameList::Entry* entry); private: void populateInputProfiles(); diff --git a/pcsx2-qt/Settings/GameSummaryWidget.ui b/pcsx2-qt/Settings/GameSummaryWidget.ui index d1a244dbad..9a9289d8f5 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.ui +++ b/pcsx2-qt/Settings/GameSummaryWidget.ui @@ -104,11 +104,25 @@ - - - true - - + + + + + true + + + + + + + false + + + Check Wiki + + + +