diff options
| author | 2019-04-13 22:06:51 -0400 | |
|---|---|---|
| committer | 2019-04-13 22:06:51 -0400 | |
| commit | ee3f57649565f8495a7bc1156b485bb9079cc237 (patch) | |
| tree | 111bd78fb9c4e82cec94794f502494d440f7de35 /src | |
| parent | Merge pull request #2391 from lioncash/scope (diff) | |
| parent | Fix Clang Format (diff) | |
| download | yuzu-ee3f57649565f8495a7bc1156b485bb9079cc237.tar.gz yuzu-ee3f57649565f8495a7bc1156b485bb9079cc237.tar.xz yuzu-ee3f57649565f8495a7bc1156b485bb9079cc237.zip | |
Merge pull request #2389 from FreddyFunk/rename-gamedir
ui_settings: Rename game directory variables
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/game_list.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 24 | ||||
| -rw-r--r-- | src/yuzu/ui_settings.h | 4 |
5 files changed, 25 insertions, 20 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 802db3945..ca60bc0c9 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -523,8 +523,8 @@ void Config::ReadValues() { | |||
| 523 | qt_config->beginGroup("Paths"); | 523 | qt_config->beginGroup("Paths"); |
| 524 | UISettings::values.roms_path = ReadSetting("romsPath").toString(); | 524 | UISettings::values.roms_path = ReadSetting("romsPath").toString(); |
| 525 | UISettings::values.symbols_path = ReadSetting("symbolsPath").toString(); | 525 | UISettings::values.symbols_path = ReadSetting("symbolsPath").toString(); |
| 526 | UISettings::values.gamedir = ReadSetting("gameListRootDir", ".").toString(); | 526 | UISettings::values.game_directory_path = ReadSetting("gameListRootDir", ".").toString(); |
| 527 | UISettings::values.gamedir_deepscan = ReadSetting("gameListDeepScan", false).toBool(); | 527 | UISettings::values.game_directory_deepscan = ReadSetting("gameListDeepScan", false).toBool(); |
| 528 | UISettings::values.recent_files = ReadSetting("recentFiles").toStringList(); | 528 | UISettings::values.recent_files = ReadSetting("recentFiles").toStringList(); |
| 529 | qt_config->endGroup(); | 529 | qt_config->endGroup(); |
| 530 | 530 | ||
| @@ -768,8 +768,8 @@ void Config::SaveValues() { | |||
| 768 | WriteSetting("romsPath", UISettings::values.roms_path); | 768 | WriteSetting("romsPath", UISettings::values.roms_path); |
| 769 | WriteSetting("symbolsPath", UISettings::values.symbols_path); | 769 | WriteSetting("symbolsPath", UISettings::values.symbols_path); |
| 770 | WriteSetting("screenshotPath", UISettings::values.screenshot_path); | 770 | WriteSetting("screenshotPath", UISettings::values.screenshot_path); |
| 771 | WriteSetting("gameListRootDir", UISettings::values.gamedir, "."); | 771 | WriteSetting("gameListRootDir", UISettings::values.game_directory_path, "."); |
| 772 | WriteSetting("gameListDeepScan", UISettings::values.gamedir_deepscan, false); | 772 | WriteSetting("gameListDeepScan", UISettings::values.game_directory_deepscan, false); |
| 773 | WriteSetting("recentFiles", UISettings::values.recent_files); | 773 | WriteSetting("recentFiles", UISettings::values.recent_files); |
| 774 | qt_config->endGroup(); | 774 | qt_config->endGroup(); |
| 775 | 775 | ||
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index eeb038afb..e48f4f5a3 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp | |||
| @@ -28,7 +28,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) | |||
| 28 | ConfigureGeneral::~ConfigureGeneral() = default; | 28 | ConfigureGeneral::~ConfigureGeneral() = default; |
| 29 | 29 | ||
| 30 | void ConfigureGeneral::setConfiguration() { | 30 | void ConfigureGeneral::setConfiguration() { |
| 31 | ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); | 31 | ui->toggle_deepscan->setChecked(UISettings::values.game_directory_deepscan); |
| 32 | ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); | 32 | ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); |
| 33 | ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot); | 33 | ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot); |
| 34 | ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme)); | 34 | ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme)); |
| @@ -36,7 +36,7 @@ void ConfigureGeneral::setConfiguration() { | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void ConfigureGeneral::applyConfiguration() { | 38 | void ConfigureGeneral::applyConfiguration() { |
| 39 | UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); | 39 | UISettings::values.game_directory_deepscan = ui->toggle_deepscan->isChecked(); |
| 40 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); | 40 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); |
| 41 | UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); | 41 | UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); |
| 42 | UISettings::values.theme = | 42 | UISettings::values.theme = |
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 4b67656ac..b0ca766ec 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -467,9 +467,10 @@ void GameList::LoadInterfaceLayout() { | |||
| 467 | const QStringList GameList::supported_file_extensions = {"nso", "nro", "nca", "xci", "nsp"}; | 467 | const QStringList GameList::supported_file_extensions = {"nso", "nro", "nca", "xci", "nsp"}; |
| 468 | 468 | ||
| 469 | void GameList::RefreshGameDirectory() { | 469 | void GameList::RefreshGameDirectory() { |
| 470 | if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) { | 470 | if (!UISettings::values.game_directory_path.isEmpty() && current_worker != nullptr) { |
| 471 | LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); | 471 | LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); |
| 472 | search_field->clear(); | 472 | search_field->clear(); |
| 473 | PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 473 | PopulateAsync(UISettings::values.game_directory_path, |
| 474 | UISettings::values.game_directory_deepscan); | ||
| 474 | } | 475 | } |
| 475 | } | 476 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ca231d710..588f53860 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -213,7 +213,8 @@ GMainWindow::GMainWindow() | |||
| 213 | OnReinitializeKeys(ReinitializeKeyBehavior::NoWarning); | 213 | OnReinitializeKeys(ReinitializeKeyBehavior::NoWarning); |
| 214 | 214 | ||
| 215 | game_list->LoadCompatibilityList(); | 215 | game_list->LoadCompatibilityList(); |
| 216 | game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 216 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 217 | UISettings::values.game_directory_deepscan); | ||
| 217 | 218 | ||
| 218 | // Show one-time "callout" messages to the user | 219 | // Show one-time "callout" messages to the user |
| 219 | ShowTelemetryCallout(); | 220 | ShowTelemetryCallout(); |
| @@ -1278,8 +1279,8 @@ void GMainWindow::OnGameListOpenPerGameProperties(const std::string& file) { | |||
| 1278 | 1279 | ||
| 1279 | const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); | 1280 | const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); |
| 1280 | if (reload) { | 1281 | if (reload) { |
| 1281 | game_list->PopulateAsync(UISettings::values.gamedir, | 1282 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 1282 | UISettings::values.gamedir_deepscan); | 1283 | UISettings::values.game_directory_deepscan); |
| 1283 | } | 1284 | } |
| 1284 | 1285 | ||
| 1285 | config->Save(); | 1286 | config->Save(); |
| @@ -1367,7 +1368,8 @@ void GMainWindow::OnMenuInstallToNAND() { | |||
| 1367 | const auto success = [this]() { | 1368 | const auto success = [this]() { |
| 1368 | QMessageBox::information(this, tr("Successfully Installed"), | 1369 | QMessageBox::information(this, tr("Successfully Installed"), |
| 1369 | tr("The file was successfully installed.")); | 1370 | tr("The file was successfully installed.")); |
| 1370 | game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 1371 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 1372 | UISettings::values.game_directory_deepscan); | ||
| 1371 | }; | 1373 | }; |
| 1372 | 1374 | ||
| 1373 | const auto failed = [this]() { | 1375 | const auto failed = [this]() { |
| @@ -1494,8 +1496,8 @@ void GMainWindow::OnMenuInstallToNAND() { | |||
| 1494 | void GMainWindow::OnMenuSelectGameListRoot() { | 1496 | void GMainWindow::OnMenuSelectGameListRoot() { |
| 1495 | QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory")); | 1497 | QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory")); |
| 1496 | if (!dir_path.isEmpty()) { | 1498 | if (!dir_path.isEmpty()) { |
| 1497 | UISettings::values.gamedir = dir_path; | 1499 | UISettings::values.game_directory_path = dir_path; |
| 1498 | game_list->PopulateAsync(dir_path, UISettings::values.gamedir_deepscan); | 1500 | game_list->PopulateAsync(dir_path, UISettings::values.game_directory_deepscan); |
| 1499 | } | 1501 | } |
| 1500 | } | 1502 | } |
| 1501 | 1503 | ||
| @@ -1517,7 +1519,8 @@ void GMainWindow::OnMenuSelectEmulatedDirectory(EmulatedDirectoryTarget target) | |||
| 1517 | : FileUtil::UserPath::NANDDir, | 1519 | : FileUtil::UserPath::NANDDir, |
| 1518 | dir_path.toStdString()); | 1520 | dir_path.toStdString()); |
| 1519 | Service::FileSystem::CreateFactories(*vfs); | 1521 | Service::FileSystem::CreateFactories(*vfs); |
| 1520 | game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 1522 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 1523 | UISettings::values.game_directory_deepscan); | ||
| 1521 | } | 1524 | } |
| 1522 | } | 1525 | } |
| 1523 | 1526 | ||
| @@ -1669,8 +1672,8 @@ void GMainWindow::OnConfigure() { | |||
| 1669 | 1672 | ||
| 1670 | const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); | 1673 | const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); |
| 1671 | if (reload) { | 1674 | if (reload) { |
| 1672 | game_list->PopulateAsync(UISettings::values.gamedir, | 1675 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 1673 | UISettings::values.gamedir_deepscan); | 1676 | UISettings::values.game_directory_deepscan); |
| 1674 | } | 1677 | } |
| 1675 | 1678 | ||
| 1676 | config->Save(); | 1679 | config->Save(); |
| @@ -1920,7 +1923,8 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) { | |||
| 1920 | Service::FileSystem::CreateFactories(*vfs); | 1923 | Service::FileSystem::CreateFactories(*vfs); |
| 1921 | 1924 | ||
| 1922 | if (behavior == ReinitializeKeyBehavior::Warning) { | 1925 | if (behavior == ReinitializeKeyBehavior::Warning) { |
| 1923 | game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 1926 | game_list->PopulateAsync(UISettings::values.game_directory_path, |
| 1927 | UISettings::values.game_directory_deepscan); | ||
| 1924 | } | 1928 | } |
| 1925 | } | 1929 | } |
| 1926 | 1930 | ||
diff --git a/src/yuzu/ui_settings.h b/src/yuzu/ui_settings.h index 45e705b61..dbd318e20 100644 --- a/src/yuzu/ui_settings.h +++ b/src/yuzu/ui_settings.h | |||
| @@ -55,8 +55,8 @@ struct Values { | |||
| 55 | QString roms_path; | 55 | QString roms_path; |
| 56 | QString symbols_path; | 56 | QString symbols_path; |
| 57 | QString screenshot_path; | 57 | QString screenshot_path; |
| 58 | QString gamedir; | 58 | QString game_directory_path; |
| 59 | bool gamedir_deepscan; | 59 | bool game_directory_deepscan; |
| 60 | QStringList recent_files; | 60 | QStringList recent_files; |
| 61 | 61 | ||
| 62 | QString theme; | 62 | QString theme; |