summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorarchshift <gh@archshift.com>2015-09-07 00:33:57 +0200
committerarchshift <gh@archshift.com>2015-10-02 04:39:14 +0200
commit797b91a449c549995ab4afe786275b02b3e1ab87 (patch)
tree900c24c996ddac7d5258c202f34cdd591e2b042d /src/citra_qt
parentInitial implementation of a game list (diff)
downloadyuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.gz
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.bz2
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.lz
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.xz
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.zst
yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/main.cpp11
-rw-r--r--src/citra_qt/main.h2
-rw-r--r--src/citra_qt/main.ui11
3 files changed, 23 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index ff2d60996..c5e338c91 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -167,6 +167,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString)));
connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()));
connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap()));
+ connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this, SLOT(OnMenuSelectGameListRoot()));
connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
@@ -380,6 +381,16 @@ void GMainWindow::OnMenuLoadSymbolMap() {
}
}
+void GMainWindow::OnMenuSelectGameListRoot() {
+ QSettings settings;
+
+ QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
+ if (!dir_path.isEmpty()) {
+ settings.setValue("gameListRootDir", dir_path);
+ game_list->PopulateAsync(dir_path, settings.value("gameListDeepScan").toBool());
+ }
+}
+
void GMainWindow::OnMenuRecentFile() {
QAction* action = qobject_cast<QAction*>(sender());
assert(action);
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index 48a1032bd..6d27ce6a9 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -92,6 +92,8 @@ private slots:
void OnGameListLoadFile(QString game_path);
void OnMenuLoadFile();
void OnMenuLoadSymbolMap();
+ /// Called whenever a user selects the "File->Select Game List Root" menu item
+ void OnMenuSelectGameListRoot();
void OnMenuRecentFile();
void OnOpenHotkeysDialog();
void OnConfigure();
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui
index 1ba700a3a..997597642 100644
--- a/src/citra_qt/main.ui
+++ b/src/citra_qt/main.ui
@@ -45,7 +45,7 @@
<x>0</x>
<y>0</y>
<width>1081</width>
- <height>21</height>
+ <height>22</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -60,6 +60,7 @@
<addaction name="action_Load_File"/>
<addaction name="action_Load_Symbol_Map"/>
<addaction name="separator"/>
+ <addaction name="action_Select_Game_List_Root"/>
<addaction name="menu_recent_files"/>
<addaction name="separator"/>
<addaction name="action_Exit"/>
@@ -182,6 +183,14 @@
<string>Display Dock Widget Headers</string>
</property>
</action>
+ <action name="action_Select_Game_List_Root">
+ <property name="text">
+ <string>Select Game Directory...</string>
+ </property>
+ <property name="toolTip">
+ <string>Selects a folder to display in the game list</string>
+ </property>
+ </action>
</widget>
<resources/>
<connections>