diff --git a/src/common/config.cpp b/src/common/config.cpp index ee8da8cc3..284407914 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -341,6 +341,10 @@ void setNullGpu(bool enable) { isNullGpu = enable; } +void setAllowHDR(bool enable) { + isHDRAllowed = enable; +} + void setCopyGPUCmdBuffers(bool enable) { shouldCopyGPUBuffers = enable; } diff --git a/src/common/config.h b/src/common/config.h index 36654f1fa..012f9b830 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -69,6 +69,7 @@ void setCollectShaderForDebug(bool enable); void setShowSplash(bool enable); void setAutoUpdate(bool enable); void setNullGpu(bool enable); +void setAllowHDR(bool enable); void setCopyGPUCmdBuffers(bool enable); void setDumpShaders(bool enable); void setVblankDiv(u32 value); diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index a66781244..e8fa2f1fd 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -277,6 +277,7 @@ SettingsDialog::SettingsDialog(std::span physical_devices, ui->heightDivider->installEventFilter(this); ui->dumpShadersCheckBox->installEventFilter(this); ui->nullGpuCheckBox->installEventFilter(this); + ui->enableHDRCheckBox->installEventFilter(this); // Paths ui->gameFoldersGroupBox->installEventFilter(this); @@ -346,6 +347,7 @@ void SettingsDialog::LoadValuesFromConfig() { ui->vblankSpinBox->setValue(toml::find_or(data, "GPU", "vblankDivider", 1)); ui->dumpShadersCheckBox->setChecked(toml::find_or(data, "GPU", "dumpShaders", false)); ui->nullGpuCheckBox->setChecked(toml::find_or(data, "GPU", "nullGpu", false)); + ui->enableHDRCheckBox->setChecked(toml::find_or(data, "General", "isHDRAllowed", false)); ui->playBGMCheckBox->setChecked(toml::find_or(data, "General", "playBGM", false)); ui->disableTrophycheckBox->setChecked( toml::find_or(data, "General", "isTrophyPopupDisabled", false)); @@ -518,6 +520,8 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) { text = tr("GUIBackgroundImageGroupBox"); } else if (elementName == "GUIMusicGroupBox") { text = tr("GUIMusicGroupBox"); + } else if (elementName == "enableHDRCheckBox") { + text = tr("enableHDRCheckBox"); } else if (elementName == "disableTrophycheckBox") { text = tr("disableTrophycheckBox"); } else if (elementName == "enableCompatibilityCheckBox") { @@ -618,6 +622,7 @@ void SettingsDialog::UpdateSettings() { Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked()); Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked()); Config::setPlayBGM(ui->playBGMCheckBox->isChecked()); + Config::setAllowHDR(ui->enableHDRCheckBox->isChecked()); Config::setLogType(ui->logTypeComboBox->currentText().toStdString()); Config::setLogFilter(ui->logFilterLineEdit->text().toStdString()); Config::setUserName(ui->userNameLineEdit->text().toStdString()); diff --git a/src/qt_gui/settings_dialog.ui b/src/qt_gui/settings_dialog.ui index 80f7a117e..1b688a9b9 100644 --- a/src/qt_gui/settings_dialog.ui +++ b/src/qt_gui/settings_dialog.ui @@ -74,7 +74,7 @@ 0 0 946 - 536 + 535 @@ -171,6 +171,13 @@ + + + + Enable HDR + + + @@ -417,7 +424,7 @@ - + 0 0 @@ -481,7 +488,7 @@ 0 0 946 - 536 + 535 @@ -585,15 +592,15 @@ - - Background Image - 0 0 + + Background Image + @@ -930,7 +937,7 @@ 0 0 946 - 536 + 535 @@ -1174,7 +1181,7 @@ 0 0 946 - 536 + 535 @@ -1318,7 +1325,7 @@ 0 0 946 - 536 + 535 @@ -1602,7 +1609,7 @@ 0 0 946 - 536 + 535 @@ -1692,7 +1699,7 @@ 0 0 946 - 536 + 535 diff --git a/src/qt_gui/translations/en.ts b/src/qt_gui/translations/en.ts index 8aff13954..98711f804 100644 --- a/src/qt_gui/translations/en.ts +++ b/src/qt_gui/translations/en.ts @@ -672,6 +672,10 @@ Enable NULL GPU Enable NULL GPU + + Enable HDR + Enable HDR + Paths Paths @@ -948,6 +952,10 @@ nullGpuCheckBox Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + + enableHDRCheckBox + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + gameFoldersBox Game Folders:\nThe list of folders to check for installed games.