summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2020-06-25 15:10:18 -0400
committerGravatar GitHub2020-06-25 15:10:18 -0400
commita980b4cbc16cf1efad077053e1bf2bbb53c3d60a (patch)
treed149581bcaee96943329afa943d30acb633065bc /src
parentMerge pull request #4160 from ogniK5377/IsASTCSupported-fix (diff)
parentCorrect function name (2/2) (diff)
downloadyuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.gz
yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.tar.xz
yuzu-a980b4cbc16cf1efad077053e1bf2bbb53c3d60a.zip
Merge pull request #4136 from VolcaEM/mods
Add a "Open Mods Page" button to the GUI
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp12
-rw-r--r--src/yuzu/main.h1
-rw-r--r--src/yuzu/main.ui6
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
56#include <QShortcut> 56#include <QShortcut>
57#include <QStatusBar> 57#include <QStatusBar>
58#include <QSysInfo> 58#include <QSysInfo>
59#include <QUrl>
59#include <QtConcurrent/QtConcurrent> 60#include <QtConcurrent/QtConcurrent>
60 61
61#include <fmt/format.h> 62#include <fmt/format.h>
@@ -836,6 +837,7 @@ void GMainWindow::ConnectMenuEvents() {
836 connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); 837 connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
837 connect(ui.action_Report_Compatibility, &QAction::triggered, this, 838 connect(ui.action_Report_Compatibility, &QAction::triggered, this,
838 &GMainWindow::OnMenuReportCompatibility); 839 &GMainWindow::OnMenuReportCompatibility);
840 connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage);
839 connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); 841 connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); });
840 connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); 842 connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
841 843
@@ -1807,6 +1809,16 @@ void GMainWindow::OnMenuReportCompatibility() {
1807 } 1809 }
1808} 1810}
1809 1811
1812void GMainWindow::OnOpenModsPage() {
1813 const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
1814 const QUrl mods_page(mods_page_url);
1815 const bool open = QDesktopServices::openUrl(mods_page);
1816 if (!open) {
1817 QMessageBox::warning(this, tr("Error opening URL"),
1818 tr("Unable to open the URL \"%1\".").arg(mods_page_url));
1819 }
1820}
1821
1810void GMainWindow::ToggleFullscreen() { 1822void GMainWindow::ToggleFullscreen() {
1811 if (!emulation_running) { 1823 if (!emulation_running) {
1812 return; 1824 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:
181 void OnPauseGame(); 181 void OnPauseGame();
182 void OnStopGame(); 182 void OnStopGame();
183 void OnMenuReportCompatibility(); 183 void OnMenuReportCompatibility();
184 void OnOpenModsPage();
184 /// Called whenever a user selects a game in the game list widget. 185 /// Called whenever a user selects a game in the game list widget.
185 void OnGameListLoadFile(QString game_path); 186 void OnGameListLoadFile(QString game_path);
186 void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); 187 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 @@
113 <string>&amp;Help</string> 113 <string>&amp;Help</string>
114 </property> 114 </property>
115 <addaction name="action_Report_Compatibility"/> 115 <addaction name="action_Report_Compatibility"/>
116 <addaction name="action_Open_Mods_Page"/>
116 <addaction name="separator"/> 117 <addaction name="separator"/>
117 <addaction name="action_About"/> 118 <addaction name="action_About"/>
118 </widget> 119 </widget>
@@ -256,6 +257,11 @@
256 <bool>false</bool> 257 <bool>false</bool>
257 </property> 258 </property>
258 </action> 259 </action>
260 <action name="action_Open_Mods_Page">
261 <property name="text">
262 <string>Open Mods Page</string>
263 </property>
264 </action>
259 <action name="action_Open_yuzu_Folder"> 265 <action name="action_Open_yuzu_Folder">
260 <property name="text"> 266 <property name="text">
261 <string>Open yuzu Folder</string> 267 <string>Open yuzu Folder</string>