summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-16 05:08:02 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-16 05:08:02 +0200
commit95409c68597c509e9f6ced959a73a41a05de372c (patch)
tree2119b125c1344ea8930559d491dc5bf0eca58e29 /src
parentconfig: Read the entire screenshots category (diff)
downloadyuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar.gz
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar.bz2
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar.lz
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar.xz
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.tar.zst
yuzu-95409c68597c509e9f6ced959a73a41a05de372c.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_ui.cpp17
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)
}
});
- const auto update_height_text = [this]() {
+ const auto update_width_text = [this]() {
const auto index = ui->screenshot_aspect_ratio->currentIndex();
const Settings::AspectRatio ratio = UISettings::ConvertScreenshotRatioToRatio(
screenshot_aspect_ratio_translations[index].first);
@@ -180,10 +180,10 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
};
connect(ui->screenshot_aspect_ratio, QOverload<int>::of(&QComboBox::currentIndexChanged),
- update_height_text);
- connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_height_text);
+ update_width_text);
+ connect(ui->screenshot_height, &QComboBox::currentTextChanged, update_width_text);
- update_height_text();
+ update_width_text();
}
ConfigureUi::~ConfigureUi() = default;
@@ -236,6 +236,15 @@ void ConfigureUi::SetConfiguration() {
UISettings::values.enable_screenshot_save_as.GetValue());
ui->screenshot_path_edit->setText(QString::fromStdString(
Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir)));
+
+ for (u32 i = 0; i < screenshot_aspect_ratio_translations.size(); i++) {
+ const auto ratio = screenshot_aspect_ratio_translations[i].first;
+ if (ratio == UISettings::values.screenshot_aspect_ratio.GetValue()) {
+ ui->screenshot_aspect_ratio->setCurrentIndex(i);
+ }
+ }
+ ui->screenshot_height->setCurrentText(
+ QString::fromStdString(fmt::format("{}", UISettings::values.screenshot_height.GetValue())));
}
void ConfigureUi::changeEvent(QEvent* event) {