early-access version 2465
This commit is contained in:
@@ -109,7 +109,7 @@ void ConfigureDialog::ApplyConfiguration() {
|
||||
ui_tab->ApplyConfiguration();
|
||||
system_tab->ApplyConfiguration();
|
||||
profile_tab->ApplyConfiguration();
|
||||
filesystem_tab->applyConfiguration();
|
||||
filesystem_tab->ApplyConfiguration();
|
||||
input_tab->ApplyConfiguration();
|
||||
hotkeys_tab->ApplyConfiguration(registry);
|
||||
cpu_tab->ApplyConfiguration();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) {
|
||||
ui->setupUi(this);
|
||||
this->setConfiguration();
|
||||
SetConfiguration();
|
||||
|
||||
connect(ui->nand_directory_button, &QToolButton::pressed, this,
|
||||
[this] { SetDirectory(DirectoryTarget::NAND, ui->nand_directory_edit); });
|
||||
@@ -38,7 +38,15 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
||||
|
||||
ConfigureFilesystem::~ConfigureFilesystem() = default;
|
||||
|
||||
void ConfigureFilesystem::setConfiguration() {
|
||||
void ConfigureFilesystem::changeEvent(QEvent* event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
RetranslateUI();
|
||||
}
|
||||
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
||||
void ConfigureFilesystem::SetConfiguration() {
|
||||
ui->nand_directory_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir)));
|
||||
ui->sdmc_directory_edit->setText(
|
||||
@@ -60,7 +68,7 @@ void ConfigureFilesystem::setConfiguration() {
|
||||
UpdateEnabledControls();
|
||||
}
|
||||
|
||||
void ConfigureFilesystem::applyConfiguration() {
|
||||
void ConfigureFilesystem::ApplyConfiguration() {
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir,
|
||||
ui->nand_directory_edit->text().toStdString());
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir,
|
||||
@@ -143,6 +151,6 @@ void ConfigureFilesystem::UpdateEnabledControls() {
|
||||
!ui->gamecard_current_game->isChecked());
|
||||
}
|
||||
|
||||
void ConfigureFilesystem::retranslateUi() {
|
||||
void ConfigureFilesystem::RetranslateUI() {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ public:
|
||||
explicit ConfigureFilesystem(QWidget* parent = nullptr);
|
||||
~ConfigureFilesystem() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
void ApplyConfiguration();
|
||||
|
||||
private:
|
||||
void setConfiguration();
|
||||
void changeEvent(QEvent* event) override;
|
||||
|
||||
void RetranslateUI();
|
||||
void SetConfiguration();
|
||||
|
||||
enum class DirectoryTarget {
|
||||
NAND,
|
||||
|
||||
@@ -178,52 +178,52 @@ void ConfigureHotkeys::SetPollingResult(Core::HID::NpadButton button, const bool
|
||||
QString ConfigureHotkeys::GetButtonName(Core::HID::NpadButton button) const {
|
||||
Core::HID::NpadButtonState state{button};
|
||||
if (state.a) {
|
||||
return tr("A");
|
||||
return QStringLiteral("A");
|
||||
}
|
||||
if (state.b) {
|
||||
return tr("B");
|
||||
return QStringLiteral("B");
|
||||
}
|
||||
if (state.x) {
|
||||
return tr("X");
|
||||
return QStringLiteral("X");
|
||||
}
|
||||
if (state.y) {
|
||||
return tr("Y");
|
||||
return QStringLiteral("Y");
|
||||
}
|
||||
if (state.l || state.right_sl || state.left_sl) {
|
||||
return tr("L");
|
||||
return QStringLiteral("L");
|
||||
}
|
||||
if (state.r || state.right_sr || state.left_sr) {
|
||||
return tr("R");
|
||||
return QStringLiteral("R");
|
||||
}
|
||||
if (state.zl) {
|
||||
return tr("ZL");
|
||||
return QStringLiteral("ZL");
|
||||
}
|
||||
if (state.zr) {
|
||||
return tr("ZR");
|
||||
return QStringLiteral("ZR");
|
||||
}
|
||||
if (state.left) {
|
||||
return tr("Dpad_Left");
|
||||
return QStringLiteral("Dpad_Left");
|
||||
}
|
||||
if (state.right) {
|
||||
return tr("Dpad_Right");
|
||||
return QStringLiteral("Dpad_Right");
|
||||
}
|
||||
if (state.up) {
|
||||
return tr("Dpad_Up");
|
||||
return QStringLiteral("Dpad_Up");
|
||||
}
|
||||
if (state.down) {
|
||||
return tr("Dpad_Down");
|
||||
return QStringLiteral("Dpad_Down");
|
||||
}
|
||||
if (state.stick_l) {
|
||||
return tr("Left_Stick");
|
||||
return QStringLiteral("Left_Stick");
|
||||
}
|
||||
if (state.stick_r) {
|
||||
return tr("Right_Stick");
|
||||
return QStringLiteral("Right_Stick");
|
||||
}
|
||||
if (state.minus) {
|
||||
return tr("Minus");
|
||||
return QStringLiteral("Minus");
|
||||
}
|
||||
if (state.plus) {
|
||||
return tr("Plus");
|
||||
return QStringLiteral("Plus");
|
||||
}
|
||||
return tr("Invalid");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user