diff options
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/configuration/configure_ui.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/yuzu/configuration/configure_ui.cpp b/src/yuzu/configuration/configure_ui.cpp index 3c99c5709..77aff01b7 100644 --- a/src/yuzu/configuration/configure_ui.cpp +++ b/src/yuzu/configuration/configure_ui.cpp | |||
| @@ -166,7 +166,7 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) | |||
| 166 | } | 166 | } |
| 167 | }); | 167 | }); |
| 168 | 168 | ||
| 169 | const auto update_height_text = [this]() { | 169 | const auto update_width_text = [this]() { |
| 170 | const auto index = ui->screenshot_aspect_ratio->currentIndex(); | 170 | const auto index = ui->screenshot_aspect_ratio->currentIndex(); |
| 171 | const Settings::AspectRatio ratio = UISettings::ConvertScreenshotRatioToRatio( | 171 | const Settings::AspectRatio ratio = UISettings::ConvertScreenshotRatioToRatio( |
| 172 | screenshot_aspect_ratio_translations[index].first); | 172 | screenshot_aspect_ratio_translations[index].first); |
| @@ -180,10 +180,10 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) | |||
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | connect(ui->screenshot_aspect_ratio, QOverload<int>::of(&QComboBox::currentIndexChanged), | 182 | connect(ui->screenshot_aspect_ratio, QOverload<int>::of(&QComboBox::currentIndexChanged), |
| 183 | update_height_text); | 183 | update_width_text); |
| 184 | connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_height_text); | 184 | connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_width_text); |
| 185 | 185 | ||
| 186 | update_height_text(); | 186 | update_width_text(); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | ConfigureUi::~ConfigureUi() = default; | 189 | ConfigureUi::~ConfigureUi() = default; |
| @@ -236,6 +236,15 @@ void ConfigureUi::SetConfiguration() { | |||
| 236 | UISettings::values.enable_screenshot_save_as.GetValue()); | 236 | UISettings::values.enable_screenshot_save_as.GetValue()); |
| 237 | ui->screenshot_path_edit->setText(QString::fromStdString( | 237 | ui->screenshot_path_edit->setText(QString::fromStdString( |
| 238 | Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir))); | 238 | Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir))); |
| 239 | |||
| 240 | for (u32 i = 0; i < screenshot_aspect_ratio_translations.size(); i++) { | ||
| 241 | const auto ratio = screenshot_aspect_ratio_translations[i].first; | ||
| 242 | if (ratio == UISettings::values.screenshot_aspect_ratio.GetValue()) { | ||
| 243 | ui->screenshot_aspect_ratio->setCurrentIndex(i); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | ui->screenshot_height->setCurrentText( | ||
| 247 | QString::fromStdString(fmt::format("{}", UISettings::values.screenshot_height.GetValue()))); | ||
| 239 | } | 248 | } |
| 240 | 249 | ||
| 241 | void ConfigureUi::changeEvent(QEvent* event) { | 250 | void ConfigureUi::changeEvent(QEvent* event) { |