mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
Add HDR option to settings menu (#2387)
This commit is contained in:
parent
0e238c87cb
commit
f3afbfbcec
5 changed files with 36 additions and 11 deletions
|
@ -341,6 +341,10 @@ void setNullGpu(bool enable) {
|
||||||
isNullGpu = enable;
|
isNullGpu = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setAllowHDR(bool enable) {
|
||||||
|
isHDRAllowed = enable;
|
||||||
|
}
|
||||||
|
|
||||||
void setCopyGPUCmdBuffers(bool enable) {
|
void setCopyGPUCmdBuffers(bool enable) {
|
||||||
shouldCopyGPUBuffers = enable;
|
shouldCopyGPUBuffers = enable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ void setCollectShaderForDebug(bool enable);
|
||||||
void setShowSplash(bool enable);
|
void setShowSplash(bool enable);
|
||||||
void setAutoUpdate(bool enable);
|
void setAutoUpdate(bool enable);
|
||||||
void setNullGpu(bool enable);
|
void setNullGpu(bool enable);
|
||||||
|
void setAllowHDR(bool enable);
|
||||||
void setCopyGPUCmdBuffers(bool enable);
|
void setCopyGPUCmdBuffers(bool enable);
|
||||||
void setDumpShaders(bool enable);
|
void setDumpShaders(bool enable);
|
||||||
void setVblankDiv(u32 value);
|
void setVblankDiv(u32 value);
|
||||||
|
|
|
@ -277,6 +277,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||||
ui->heightDivider->installEventFilter(this);
|
ui->heightDivider->installEventFilter(this);
|
||||||
ui->dumpShadersCheckBox->installEventFilter(this);
|
ui->dumpShadersCheckBox->installEventFilter(this);
|
||||||
ui->nullGpuCheckBox->installEventFilter(this);
|
ui->nullGpuCheckBox->installEventFilter(this);
|
||||||
|
ui->enableHDRCheckBox->installEventFilter(this);
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
ui->gameFoldersGroupBox->installEventFilter(this);
|
ui->gameFoldersGroupBox->installEventFilter(this);
|
||||||
|
@ -346,6 +347,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||||
ui->vblankSpinBox->setValue(toml::find_or<int>(data, "GPU", "vblankDivider", 1));
|
ui->vblankSpinBox->setValue(toml::find_or<int>(data, "GPU", "vblankDivider", 1));
|
||||||
ui->dumpShadersCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "dumpShaders", false));
|
ui->dumpShadersCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "dumpShaders", false));
|
||||||
ui->nullGpuCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "nullGpu", false));
|
ui->nullGpuCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "nullGpu", false));
|
||||||
|
ui->enableHDRCheckBox->setChecked(toml::find_or<bool>(data, "General", "isHDRAllowed", false));
|
||||||
ui->playBGMCheckBox->setChecked(toml::find_or<bool>(data, "General", "playBGM", false));
|
ui->playBGMCheckBox->setChecked(toml::find_or<bool>(data, "General", "playBGM", false));
|
||||||
ui->disableTrophycheckBox->setChecked(
|
ui->disableTrophycheckBox->setChecked(
|
||||||
toml::find_or<bool>(data, "General", "isTrophyPopupDisabled", false));
|
toml::find_or<bool>(data, "General", "isTrophyPopupDisabled", false));
|
||||||
|
@ -518,6 +520,8 @@ void SettingsDialog::updateNoteTextEdit(const QString& elementName) {
|
||||||
text = tr("GUIBackgroundImageGroupBox");
|
text = tr("GUIBackgroundImageGroupBox");
|
||||||
} else if (elementName == "GUIMusicGroupBox") {
|
} else if (elementName == "GUIMusicGroupBox") {
|
||||||
text = tr("GUIMusicGroupBox");
|
text = tr("GUIMusicGroupBox");
|
||||||
|
} else if (elementName == "enableHDRCheckBox") {
|
||||||
|
text = tr("enableHDRCheckBox");
|
||||||
} else if (elementName == "disableTrophycheckBox") {
|
} else if (elementName == "disableTrophycheckBox") {
|
||||||
text = tr("disableTrophycheckBox");
|
text = tr("disableTrophycheckBox");
|
||||||
} else if (elementName == "enableCompatibilityCheckBox") {
|
} else if (elementName == "enableCompatibilityCheckBox") {
|
||||||
|
@ -618,6 +622,7 @@ void SettingsDialog::UpdateSettings() {
|
||||||
Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked());
|
Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked());
|
||||||
Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked());
|
Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked());
|
||||||
Config::setPlayBGM(ui->playBGMCheckBox->isChecked());
|
Config::setPlayBGM(ui->playBGMCheckBox->isChecked());
|
||||||
|
Config::setAllowHDR(ui->enableHDRCheckBox->isChecked());
|
||||||
Config::setLogType(ui->logTypeComboBox->currentText().toStdString());
|
Config::setLogType(ui->logTypeComboBox->currentText().toStdString());
|
||||||
Config::setLogFilter(ui->logFilterLineEdit->text().toStdString());
|
Config::setLogFilter(ui->logFilterLineEdit->text().toStdString());
|
||||||
Config::setUserName(ui->userNameLineEdit->text().toStdString());
|
Config::setUserName(ui->userNameLineEdit->text().toStdString());
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
||||||
|
@ -171,6 +171,13 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="enableHDRCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable HDR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="separateUpdatesCheckBox">
|
<widget class="QCheckBox" name="separateUpdatesCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -417,7 +424,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="checkUpdateButton">
|
<widget class="QPushButton" name="checkUpdateButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -481,7 +488,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="guiTabVLayout" stretch="0">
|
||||||
|
@ -585,15 +592,15 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="GUIBackgroundImageGroupBox">
|
<widget class="QGroupBox" name="GUIBackgroundImageGroupBox">
|
||||||
<property name="title">
|
|
||||||
<string>Background Image</string>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Background Image</string>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" name="backgroundImageVLayout">
|
<layout class="QVBoxLayout" name="backgroundImageVLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="showBackgroundImageCheckBox">
|
<widget class="QCheckBox" name="showBackgroundImageCheckBox">
|
||||||
|
@ -930,7 +937,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
||||||
|
@ -1174,7 +1181,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="userTabVLayout" stretch="0,0,1">
|
<layout class="QVBoxLayout" name="userTabVLayout" stretch="0,0,1">
|
||||||
|
@ -1318,7 +1325,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||||
|
@ -1602,7 +1609,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="pathsTabLayout">
|
<layout class="QVBoxLayout" name="pathsTabLayout">
|
||||||
|
@ -1692,7 +1699,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>536</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,0">
|
||||||
|
|
|
@ -672,6 +672,10 @@
|
||||||
<source>Enable NULL GPU</source>
|
<source>Enable NULL GPU</source>
|
||||||
<translation>Enable NULL GPU</translation>
|
<translation>Enable NULL GPU</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable HDR</source>
|
||||||
|
<translation>Enable HDR</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Paths</source>
|
<source>Paths</source>
|
||||||
<translation>Paths</translation>
|
<translation>Paths</translation>
|
||||||
|
@ -948,6 +952,10 @@
|
||||||
<source>nullGpuCheckBox</source>
|
<source>nullGpuCheckBox</source>
|
||||||
<translation>Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card.</translation>
|
<translation>Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>enableHDRCheckBox</source>
|
||||||
|
<translation>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.</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>gameFoldersBox</source>
|
<source>gameFoldersBox</source>
|
||||||
<translation>Game Folders:\nThe list of folders to check for installed games.</translation>
|
<translation>Game Folders:\nThe list of folders to check for installed games.</translation>
|
||||||
|
|
Loading…
Add table
Reference in a new issue