diff options
| author | 2015-09-06 15:33:57 -0700 | |
|---|---|---|
| committer | 2015-10-01 19:39:14 -0700 | |
| commit | 797b91a449c549995ab4afe786275b02b3e1ab87 (patch) | |
| tree | 900c24c996ddac7d5258c202f34cdd591e2b042d /src/citra_qt/main.cpp | |
| parent | Initial implementation of a game list (diff) | |
| download | yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.gz yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.tar.xz yuzu-797b91a449c549995ab4afe786275b02b3e1ab87.zip | |
Add menu item for selecting the game list folder
Diffstat (limited to 'src/citra_qt/main.cpp')
| -rw-r--r-- | src/citra_qt/main.cpp | 11 |
1 files changed, 11 insertions, 0 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) | |||
| 167 | connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString))); | 167 | connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString))); |
| 168 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); | 168 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); |
| 169 | connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); | 169 | connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); |
| 170 | connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this, SLOT(OnMenuSelectGameListRoot())); | ||
| 170 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); | 171 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); |
| 171 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); | 172 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); |
| 172 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); | 173 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); |
| @@ -380,6 +381,16 @@ void GMainWindow::OnMenuLoadSymbolMap() { | |||
| 380 | } | 381 | } |
| 381 | } | 382 | } |
| 382 | 383 | ||
| 384 | void GMainWindow::OnMenuSelectGameListRoot() { | ||
| 385 | QSettings settings; | ||
| 386 | |||
| 387 | QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory")); | ||
| 388 | if (!dir_path.isEmpty()) { | ||
| 389 | settings.setValue("gameListRootDir", dir_path); | ||
| 390 | game_list->PopulateAsync(dir_path, settings.value("gameListDeepScan").toBool()); | ||
| 391 | } | ||
| 392 | } | ||
| 393 | |||
| 383 | void GMainWindow::OnMenuRecentFile() { | 394 | void GMainWindow::OnMenuRecentFile() { |
| 384 | QAction* action = qobject_cast<QAction*>(sender()); | 395 | QAction* action = qobject_cast<QAction*>(sender()); |
| 385 | assert(action); | 396 | assert(action); |