From 400fa7f9a0bb35ca368535ad75c715743f7b16e9 Mon Sep 17 00:00:00 2001 From: noah the goodra Date: Wed, 8 Feb 2017 18:48:08 -0600 Subject: [PATCH] added a refresh game directory option to the file menu --- src/citra_qt/main.cpp | 7 +++++++ src/citra_qt/main.h | 1 + src/citra_qt/main.ui | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index f765c0147..64d6ac696 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -230,6 +230,8 @@ void GMainWindow::ConnectWidgetEvents() { 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_Refresh_Game_Directory, SIGNAL(triggered()), this, + SLOT(OnMenuRefreshGameDirectory())); 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())); @@ -493,6 +495,11 @@ void GMainWindow::OnMenuSelectGameListRoot() { game_list->PopulateAsync(dir_path, UISettings::values.gamedir_deepscan); } } +void GMainWindow::OnMenuRefreshGameDirectory() { + if (!UISettings::values.gamedir.isEmpty()) { + game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); + } +} void GMainWindow::OnMenuRecentFile() { QAction* action = qobject_cast(sender()); diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index a2fd45c47..f3a9cc11d 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -123,6 +123,7 @@ private slots: void OnMenuLoadSymbolMap(); /// Called whenever a user selects the "File->Select Game List Root" menu item void OnMenuSelectGameListRoot(); + void OnMenuRefreshGameDirectory(); void OnMenuRecentFile(); void OnSwapScreens(); void OnConfigure(); diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui index adfa3689e..f425677c7 100644 --- a/src/citra_qt/main.ui +++ b/src/citra_qt/main.ui @@ -61,6 +61,7 @@ + @@ -167,6 +168,11 @@ Selects a folder to display in the game list + + + Refresh Game Directory + +