diff options
author | bunnei <bunneidev@gmail.com> | 2020-06-25 21:10:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 21:10:18 +0200 |
commit | a980b4cbc16cf1efad077053e1bf2bbb53c3d60a (patch) | |
tree | d149581bcaee96943329afa943d30acb633065bc /src | |
parent | Merge pull request #4160 from ogniK5377/IsASTCSupported-fix (diff) | |
parent | Correct function name (2/2) (diff) | |
download | yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.gz yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.bz2 yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.lz yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.xz yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.zst yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/main.cpp | 12 | ||||
-rw-r--r-- | src/yuzu/main.h | 1 | ||||
-rw-r--r-- | src/yuzu/main.ui | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 059b96e70..4dedb2549 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -56,6 +56,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include <QShortcut> #include <QStatusBar> #include <QSysInfo> +#include <QUrl> #include <QtConcurrent/QtConcurrent> #include <fmt/format.h> @@ -836,6 +837,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); + connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1807,6 +1809,16 @@ void GMainWindow::OnMenuReportCompatibility() { } } +void GMainWindow::OnOpenModsPage() { + const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"); + const QUrl mods_page(mods_page_url); + const bool open = QDesktopServices::openUrl(mods_page); + if (!open) { + QMessageBox::warning(this, tr("Error opening URL"), + tr("Unable to open the URL \"%1\".").arg(mods_page_url)); + } +} + void GMainWindow::ToggleFullscreen() { if (!emulation_running) { return; diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 4f4c8ddbe..d55e55cc6 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -181,6 +181,7 @@ private slots: void OnPauseGame(); void OnStopGame(); void OnMenuReportCompatibility(); + void OnOpenModsPage(); /// Called whenever a user selects a game in the game list widget. void OnGameListLoadFile(QString game_path); void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index 97c90f50b..b5745dfd5 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -113,6 +113,7 @@ <string>&Help</string> </property> <addaction name="action_Report_Compatibility"/> + <addaction name="action_Open_Mods_Page"/> <addaction name="separator"/> <addaction name="action_About"/> </widget> @@ -256,6 +257,11 @@ <bool>false</bool> </property> </action> + <action name="action_Open_Mods_Page"> + <property name="text"> + <string>Open Mods Page</string> + </property> + </action> <action name="action_Open_yuzu_Folder"> <property name="text"> <string>Open yuzu Folder</string> |