diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_dialog.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_filesystem.cpp | 16 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_filesystem.h | 8 |
3 files changed, 18 insertions, 8 deletions
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index 464e7a489..19133ccf5 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp | |||
| @@ -109,7 +109,7 @@ void ConfigureDialog::ApplyConfiguration() { | |||
| 109 | ui_tab->ApplyConfiguration(); | 109 | ui_tab->ApplyConfiguration(); |
| 110 | system_tab->ApplyConfiguration(); | 110 | system_tab->ApplyConfiguration(); |
| 111 | profile_tab->ApplyConfiguration(); | 111 | profile_tab->ApplyConfiguration(); |
| 112 | filesystem_tab->applyConfiguration(); | 112 | filesystem_tab->ApplyConfiguration(); |
| 113 | input_tab->ApplyConfiguration(); | 113 | input_tab->ApplyConfiguration(); |
| 114 | hotkeys_tab->ApplyConfiguration(registry); | 114 | hotkeys_tab->ApplyConfiguration(registry); |
| 115 | cpu_tab->ApplyConfiguration(); | 115 | cpu_tab->ApplyConfiguration(); |
diff --git a/src/yuzu/configuration/configure_filesystem.cpp b/src/yuzu/configuration/configure_filesystem.cpp index 9cb317822..d6fb43f8b 100644 --- a/src/yuzu/configuration/configure_filesystem.cpp +++ b/src/yuzu/configuration/configure_filesystem.cpp | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | ConfigureFilesystem::ConfigureFilesystem(QWidget* parent) | 14 | ConfigureFilesystem::ConfigureFilesystem(QWidget* parent) |
| 15 | : QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) { | 15 | : QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) { |
| 16 | ui->setupUi(this); | 16 | ui->setupUi(this); |
| 17 | this->setConfiguration(); | 17 | SetConfiguration(); |
| 18 | 18 | ||
| 19 | connect(ui->nand_directory_button, &QToolButton::pressed, this, | 19 | connect(ui->nand_directory_button, &QToolButton::pressed, this, |
| 20 | [this] { SetDirectory(DirectoryTarget::NAND, ui->nand_directory_edit); }); | 20 | [this] { SetDirectory(DirectoryTarget::NAND, ui->nand_directory_edit); }); |
| @@ -38,7 +38,15 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent) | |||
| 38 | 38 | ||
| 39 | ConfigureFilesystem::~ConfigureFilesystem() = default; | 39 | ConfigureFilesystem::~ConfigureFilesystem() = default; |
| 40 | 40 | ||
| 41 | void ConfigureFilesystem::setConfiguration() { | 41 | void ConfigureFilesystem::changeEvent(QEvent* event) { |
| 42 | if (event->type() == QEvent::LanguageChange) { | ||
| 43 | RetranslateUI(); | ||
| 44 | } | ||
| 45 | |||
| 46 | QWidget::changeEvent(event); | ||
| 47 | } | ||
| 48 | |||
| 49 | void ConfigureFilesystem::SetConfiguration() { | ||
| 42 | ui->nand_directory_edit->setText( | 50 | ui->nand_directory_edit->setText( |
| 43 | QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir))); | 51 | QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir))); |
| 44 | ui->sdmc_directory_edit->setText( | 52 | ui->sdmc_directory_edit->setText( |
| @@ -60,7 +68,7 @@ void ConfigureFilesystem::setConfiguration() { | |||
| 60 | UpdateEnabledControls(); | 68 | UpdateEnabledControls(); |
| 61 | } | 69 | } |
| 62 | 70 | ||
| 63 | void ConfigureFilesystem::applyConfiguration() { | 71 | void ConfigureFilesystem::ApplyConfiguration() { |
| 64 | Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir, | 72 | Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir, |
| 65 | ui->nand_directory_edit->text().toStdString()); | 73 | ui->nand_directory_edit->text().toStdString()); |
| 66 | Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir, | 74 | Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir, |
| @@ -143,6 +151,6 @@ void ConfigureFilesystem::UpdateEnabledControls() { | |||
| 143 | !ui->gamecard_current_game->isChecked()); | 151 | !ui->gamecard_current_game->isChecked()); |
| 144 | } | 152 | } |
| 145 | 153 | ||
| 146 | void ConfigureFilesystem::retranslateUi() { | 154 | void ConfigureFilesystem::RetranslateUI() { |
| 147 | ui->retranslateUi(this); | 155 | ui->retranslateUi(this); |
| 148 | } | 156 | } |
diff --git a/src/yuzu/configuration/configure_filesystem.h b/src/yuzu/configuration/configure_filesystem.h index 2147cd405..b4f9355eb 100644 --- a/src/yuzu/configuration/configure_filesystem.h +++ b/src/yuzu/configuration/configure_filesystem.h | |||
| @@ -20,11 +20,13 @@ public: | |||
| 20 | explicit ConfigureFilesystem(QWidget* parent = nullptr); | 20 | explicit ConfigureFilesystem(QWidget* parent = nullptr); |
| 21 | ~ConfigureFilesystem() override; | 21 | ~ConfigureFilesystem() override; |
| 22 | 22 | ||
| 23 | void applyConfiguration(); | 23 | void ApplyConfiguration(); |
| 24 | void retranslateUi(); | ||
| 25 | 24 | ||
| 26 | private: | 25 | private: |
| 27 | void setConfiguration(); | 26 | void changeEvent(QEvent* event) override; |
| 27 | |||
| 28 | void RetranslateUI(); | ||
| 29 | void SetConfiguration(); | ||
| 28 | 30 | ||
| 29 | enum class DirectoryTarget { | 31 | enum class DirectoryTarget { |
| 30 | NAND, | 32 | NAND, |