mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
merge display combo box and fullscreen checkbox
This commit is contained in:
parent
448f184306
commit
d75e5aa14a
@ -77,7 +77,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> 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<const QString> 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<int>(data, "General", "BGMvolume", 50));
|
||||
ui->discordRPCCheckbox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "enableDiscordRPC", true));
|
||||
ui->fullscreenCheckBox->setChecked(toml::find_or<bool>(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<bool>(data, "General", "separateUpdateEnabled", false));
|
||||
ui->gameSizeCheckBox->setChecked(toml::find_or<bool>(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<std::string> 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());
|
||||
|
@ -975,21 +975,21 @@
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<!-- <item>
|
||||
<widget class="QCheckBox" name="fullscreenCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable Fullscreen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</item> -->
|
||||
<item>
|
||||
<widget class="QGroupBox" name="fullscreenModeGroupBox">
|
||||
<widget class="QGroupBox" name="displayModeGroupBox">
|
||||
<property name="title">
|
||||
<string>Fullscreen Mode</string>
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="fullscreenModeLayout">
|
||||
<layout class="QVBoxLayout" name="displayModeLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="fullscreenModeComboBox">
|
||||
<widget class="QComboBox" name="displayModeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1003,7 +1003,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>True</string>
|
||||
<string>Fullscreen</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user