From d75e5aa14a66e035e3439887d4afff0e5991532f Mon Sep 17 00:00:00 2001 From: Jarred Wilson Date: Thu, 20 Feb 2025 14:47:51 +0000 Subject: [PATCH] merge display combo box and fullscreen checkbox --- src/qt_gui/settings_dialog.cpp | 14 ++++---------- src/qt_gui/settings_dialog.ui | 14 +++++++------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index bebb16c9a..b3410e02c 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -77,7 +77,7 @@ SettingsDialog::SettingsDialog(std::span physical_devices, channelMap = {{tr("Release"), "Release"}, {tr("Nightly"), "Nightly"}}; logTypeMap = {{tr("async"), "async"}, {tr("sync"), "sync"}}; - fullscreenModeMap = {{tr("Borderless"), "Borderless"}, {tr("True"), "True"}}; + fullscreenModeMap = {{tr("Borderless"), "Borderless"}, {tr("Fullscreen"), "Fullscreen"}}; chooseHomeTabMap = {{tr("General"), "General"}, {tr("GUI"), "GUI"}, {tr("Graphics"), "Graphics"}, {tr("User"), "User"}, {tr("Input"), "Input"}, {tr("Paths"), "Paths"}, @@ -274,7 +274,6 @@ SettingsDialog::SettingsDialog(std::span physical_devices, // General ui->consoleLanguageGroupBox->installEventFilter(this); ui->emulatorLanguageGroupBox->installEventFilter(this); - ui->fullscreenCheckBox->installEventFilter(this); ui->separateUpdatesCheckBox->installEventFilter(this); ui->showSplashCheckBox->installEventFilter(this); ui->discordRPCCheckbox->installEventFilter(this); @@ -382,12 +381,9 @@ void SettingsDialog::LoadValuesFromConfig() { ui->BGMVolumeSlider->setValue(toml::find_or(data, "General", "BGMvolume", 50)); ui->discordRPCCheckbox->setChecked( toml::find_or(data, "General", "enableDiscordRPC", true)); - ui->fullscreenCheckBox->setChecked(toml::find_or(data, "General", "Fullscreen", false)); QString translatedText_FullscreenMode = fullscreenModeMap.key(QString::fromStdString(Config::getFullscreenMode())); - if (!translatedText_FullscreenMode.isEmpty()) { - ui->fullscreenModeComboBox->setCurrentText(translatedText_FullscreenMode); - } + ui->displayModeComboBox->setCurrentText(translatedText_FullscreenMode); ui->separateUpdatesCheckBox->setChecked( toml::find_or(data, "General", "separateUpdateEnabled", false)); ui->gameSizeCheckBox->setChecked(toml::find_or(data, "GUI", "loadGameSizeEnabled", true)); @@ -533,8 +529,6 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) { text = tr("Console Language:\\nSets the language that the PS4 game uses.\\nIt's recommended to set this to a language the game supports, which will vary by region."); } else if (elementName == "emulatorLanguageGroupBox") { text = tr("Emulator Language:\\nSets the language of the emulator's user interface."); - } else if (elementName == "fullscreenCheckBox") { - text = tr("Enable Full Screen:\\nAutomatically puts the game window into full-screen mode.\\nThis can be toggled by pressing the F11 key."); } else if (elementName == "separateUpdatesCheckBox") { text = tr("Enable Separate Update Folder:\\nEnables installing game updates into a separate folder for easy management.\\nThis can be manually created by adding the extracted update to the game folder with the name \"CUSA00000-UPDATE\" where the CUSA ID matches the game's ID."); } else if (elementName == "showSplashCheckBox") { @@ -652,9 +646,9 @@ void SettingsDialog::UpdateSettings() { const QVector TouchPadIndex = {"left", "center", "right", "none"}; Config::setBackButtonBehavior(TouchPadIndex[ui->backButtonBehaviorComboBox->currentIndex()]); - Config::setIsFullscreen(ui->fullscreenCheckBox->isChecked()); + Config::setIsFullscreen(ui->displayModeComboBox->currentText().toStdString() == "Fullscreen"); Config::setFullscreenMode( - fullscreenModeMap.value(ui->fullscreenModeComboBox->currentText()).toStdString()); + fullscreenModeMap.value(ui->displayModeComboBox->currentText()).toStdString()); Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked()); Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked()); Config::setPlayBGM(ui->playBGMCheckBox->isChecked()); diff --git a/src/qt_gui/settings_dialog.ui b/src/qt_gui/settings_dialog.ui index d29629c90..5cfd9bc91 100644 --- a/src/qt_gui/settings_dialog.ui +++ b/src/qt_gui/settings_dialog.ui @@ -975,21 +975,21 @@ 12 - + - + - Fullscreen Mode + Mode - + - + 0 @@ -1003,7 +1003,7 @@ - True + Fullscreen