mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-03 06:10:00 +00:00
Merge pull request #2389 from FreddyFunk/rename-gamedir
ui_settings: Rename game directory variables
This commit is contained in:
commit
ee3f576495
5 changed files with 25 additions and 20 deletions
|
@ -523,8 +523,8 @@ void Config::ReadValues() {
|
||||||
qt_config->beginGroup("Paths");
|
qt_config->beginGroup("Paths");
|
||||||
UISettings::values.roms_path = ReadSetting("romsPath").toString();
|
UISettings::values.roms_path = ReadSetting("romsPath").toString();
|
||||||
UISettings::values.symbols_path = ReadSetting("symbolsPath").toString();
|
UISettings::values.symbols_path = ReadSetting("symbolsPath").toString();
|
||||||
UISettings::values.gamedir = ReadSetting("gameListRootDir", ".").toString();
|
UISettings::values.game_directory_path = ReadSetting("gameListRootDir", ".").toString();
|
||||||
UISettings::values.gamedir_deepscan = ReadSetting("gameListDeepScan", false).toBool();
|
UISettings::values.game_directory_deepscan = ReadSetting("gameListDeepScan", false).toBool();
|
||||||
UISettings::values.recent_files = ReadSetting("recentFiles").toStringList();
|
UISettings::values.recent_files = ReadSetting("recentFiles").toStringList();
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
|
@ -768,8 +768,8 @@ void Config::SaveValues() {
|
||||||
WriteSetting("romsPath", UISettings::values.roms_path);
|
WriteSetting("romsPath", UISettings::values.roms_path);
|
||||||
WriteSetting("symbolsPath", UISettings::values.symbols_path);
|
WriteSetting("symbolsPath", UISettings::values.symbols_path);
|
||||||
WriteSetting("screenshotPath", UISettings::values.screenshot_path);
|
WriteSetting("screenshotPath", UISettings::values.screenshot_path);
|
||||||
WriteSetting("gameListRootDir", UISettings::values.gamedir, ".");
|
WriteSetting("gameListRootDir", UISettings::values.game_directory_path, ".");
|
||||||
WriteSetting("gameListDeepScan", UISettings::values.gamedir_deepscan, false);
|
WriteSetting("gameListDeepScan", UISettings::values.game_directory_deepscan, false);
|
||||||
WriteSetting("recentFiles", UISettings::values.recent_files);
|
WriteSetting("recentFiles", UISettings::values.recent_files);
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||||
ConfigureGeneral::~ConfigureGeneral() = default;
|
ConfigureGeneral::~ConfigureGeneral() = default;
|
||||||
|
|
||||||
void ConfigureGeneral::setConfiguration() {
|
void ConfigureGeneral::setConfiguration() {
|
||||||
ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan);
|
ui->toggle_deepscan->setChecked(UISettings::values.game_directory_deepscan);
|
||||||
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
|
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
|
||||||
ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot);
|
ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot);
|
||||||
ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme));
|
ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme));
|
||||||
|
@ -36,7 +36,7 @@ void ConfigureGeneral::setConfiguration() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGeneral::applyConfiguration() {
|
void ConfigureGeneral::applyConfiguration() {
|
||||||
UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked();
|
UISettings::values.game_directory_deepscan = ui->toggle_deepscan->isChecked();
|
||||||
UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
|
UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
|
||||||
UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
|
UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
|
||||||
UISettings::values.theme =
|
UISettings::values.theme =
|
||||||
|
|
|
@ -467,9 +467,10 @@ void GameList::LoadInterfaceLayout() {
|
||||||
const QStringList GameList::supported_file_extensions = {"nso", "nro", "nca", "xci", "nsp"};
|
const QStringList GameList::supported_file_extensions = {"nso", "nro", "nca", "xci", "nsp"};
|
||||||
|
|
||||||
void GameList::RefreshGameDirectory() {
|
void GameList::RefreshGameDirectory() {
|
||||||
if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) {
|
if (!UISettings::values.game_directory_path.isEmpty() && current_worker != nullptr) {
|
||||||
LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list.");
|
LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list.");
|
||||||
search_field->clear();
|
search_field->clear();
|
||||||
PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
|
PopulateAsync(UISettings::values.game_directory_path,
|
||||||
|
UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,8 @@ GMainWindow::GMainWindow()
|
||||||
OnReinitializeKeys(ReinitializeKeyBehavior::NoWarning);
|
OnReinitializeKeys(ReinitializeKeyBehavior::NoWarning);
|
||||||
|
|
||||||
game_list->LoadCompatibilityList();
|
game_list->LoadCompatibilityList();
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
|
UISettings::values.game_directory_deepscan);
|
||||||
|
|
||||||
// Show one-time "callout" messages to the user
|
// Show one-time "callout" messages to the user
|
||||||
ShowTelemetryCallout();
|
ShowTelemetryCallout();
|
||||||
|
@ -1278,8 +1279,8 @@ void GMainWindow::OnGameListOpenPerGameProperties(const std::string& file) {
|
||||||
|
|
||||||
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
||||||
if (reload) {
|
if (reload) {
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir,
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
UISettings::values.gamedir_deepscan);
|
UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
|
|
||||||
config->Save();
|
config->Save();
|
||||||
|
@ -1367,7 +1368,8 @@ void GMainWindow::OnMenuInstallToNAND() {
|
||||||
const auto success = [this]() {
|
const auto success = [this]() {
|
||||||
QMessageBox::information(this, tr("Successfully Installed"),
|
QMessageBox::information(this, tr("Successfully Installed"),
|
||||||
tr("The file was successfully installed."));
|
tr("The file was successfully installed."));
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
|
UISettings::values.game_directory_deepscan);
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto failed = [this]() {
|
const auto failed = [this]() {
|
||||||
|
@ -1494,8 +1496,8 @@ void GMainWindow::OnMenuInstallToNAND() {
|
||||||
void GMainWindow::OnMenuSelectGameListRoot() {
|
void GMainWindow::OnMenuSelectGameListRoot() {
|
||||||
QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
|
QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
|
||||||
if (!dir_path.isEmpty()) {
|
if (!dir_path.isEmpty()) {
|
||||||
UISettings::values.gamedir = dir_path;
|
UISettings::values.game_directory_path = dir_path;
|
||||||
game_list->PopulateAsync(dir_path, UISettings::values.gamedir_deepscan);
|
game_list->PopulateAsync(dir_path, UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1517,7 +1519,8 @@ void GMainWindow::OnMenuSelectEmulatedDirectory(EmulatedDirectoryTarget target)
|
||||||
: FileUtil::UserPath::NANDDir,
|
: FileUtil::UserPath::NANDDir,
|
||||||
dir_path.toStdString());
|
dir_path.toStdString());
|
||||||
Service::FileSystem::CreateFactories(*vfs);
|
Service::FileSystem::CreateFactories(*vfs);
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
|
UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1669,8 +1672,8 @@ void GMainWindow::OnConfigure() {
|
||||||
|
|
||||||
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);
|
||||||
if (reload) {
|
if (reload) {
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir,
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
UISettings::values.gamedir_deepscan);
|
UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
|
|
||||||
config->Save();
|
config->Save();
|
||||||
|
@ -1920,7 +1923,8 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) {
|
||||||
Service::FileSystem::CreateFactories(*vfs);
|
Service::FileSystem::CreateFactories(*vfs);
|
||||||
|
|
||||||
if (behavior == ReinitializeKeyBehavior::Warning) {
|
if (behavior == ReinitializeKeyBehavior::Warning) {
|
||||||
game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
|
UISettings::values.game_directory_deepscan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ struct Values {
|
||||||
QString roms_path;
|
QString roms_path;
|
||||||
QString symbols_path;
|
QString symbols_path;
|
||||||
QString screenshot_path;
|
QString screenshot_path;
|
||||||
QString gamedir;
|
QString game_directory_path;
|
||||||
bool gamedir_deepscan;
|
bool game_directory_deepscan;
|
||||||
QStringList recent_files;
|
QStringList recent_files;
|
||||||
|
|
||||||
QString theme;
|
QString theme;
|
||||||
|
|
Loading…
Reference in a new issue