Merge pull request #11093 from Pokechu22/disable-graphics-settings
Disable graphics settings fields when incompatible settings are enabled
This commit is contained in:
commit
c53e29c3c8
|
@ -36,6 +36,10 @@ AdvancedWidget::AdvancedWidget(GraphicsWindow* parent)
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
||||||
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
||||||
});
|
});
|
||||||
|
connect(m_manual_texture_sampling, &QCheckBox::toggled, [this, parent] {
|
||||||
|
SaveSettings();
|
||||||
|
emit parent->UseFastTextureSamplingChanged();
|
||||||
|
});
|
||||||
|
|
||||||
OnBackendChanged();
|
OnBackendChanged();
|
||||||
OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized);
|
OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized);
|
||||||
|
|
|
@ -39,6 +39,10 @@ EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent) : m_block_save(fa
|
||||||
AddDescriptions();
|
AddDescriptions();
|
||||||
connect(parent, &GraphicsWindow::BackendChanged,
|
connect(parent, &GraphicsWindow::BackendChanged,
|
||||||
[this](const QString& backend) { LoadSettings(); });
|
[this](const QString& backend) { LoadSettings(); });
|
||||||
|
connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this,
|
||||||
|
&EnhancementsWidget::LoadSettings);
|
||||||
|
connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this,
|
||||||
|
&EnhancementsWidget::LoadSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr int TEXTURE_FILTERING_DEFAULT = 0;
|
constexpr int TEXTURE_FILTERING_DEFAULT = 0;
|
||||||
|
@ -307,6 +311,9 @@ void EnhancementsWidget::LoadPPShaders()
|
||||||
void EnhancementsWidget::LoadSettings()
|
void EnhancementsWidget::LoadSettings()
|
||||||
{
|
{
|
||||||
m_block_save = true;
|
m_block_save = true;
|
||||||
|
m_texture_filtering_combo->setEnabled(Config::Get(Config::GFX_HACK_FAST_TEXTURE_SAMPLING));
|
||||||
|
m_arbitrary_mipmap_detection->setEnabled(!Config::Get(Config::GFX_ENABLE_GPU_TEXTURE_DECODING));
|
||||||
|
|
||||||
// Anti-Aliasing
|
// Anti-Aliasing
|
||||||
|
|
||||||
const u32 aa_selection = Config::Get(Config::GFX_MSAA);
|
const u32 aa_selection = Config::Get(Config::GFX_MSAA);
|
||||||
|
@ -503,7 +510,8 @@ void EnhancementsWidget::AddDescriptions()
|
||||||
"that are at oblique viewing angles. Force Nearest and Force Linear override the texture "
|
"that are at oblique viewing angles. Force Nearest and Force Linear override the texture "
|
||||||
"scaling filter selected by the game.<br><br>Any option except 'Default' will alter the look "
|
"scaling filter selected by the game.<br><br>Any option except 'Default' will alter the look "
|
||||||
"of the game's textures and might cause issues in a small number of "
|
"of the game's textures and might cause issues in a small number of "
|
||||||
"games.<br><br><dolphin_emphasis>If unsure, select 'Default'.</dolphin_emphasis>");
|
"games.<br><br>This option is incompatible with Manual Texture Sampling.<br><br>"
|
||||||
|
"<dolphin_emphasis>If unsure, select 'Default'.</dolphin_emphasis>");
|
||||||
static const char TR_OUTPUT_RESAMPLING_DESCRIPTION[] =
|
static const char TR_OUTPUT_RESAMPLING_DESCRIPTION[] =
|
||||||
QT_TR_NOOP("Affects how the game output is scaled to the window resolution."
|
QT_TR_NOOP("Affects how the game output is scaled to the window resolution."
|
||||||
"<br>The performance mostly depends on the number of samples each method uses."
|
"<br>The performance mostly depends on the number of samples each method uses."
|
||||||
|
|
|
@ -24,6 +24,8 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void BackendChanged(const QString& backend);
|
void BackendChanged(const QString& backend);
|
||||||
|
void UseFastTextureSamplingChanged();
|
||||||
|
void UseGPUTextureDecodingChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateMainLayout();
|
void CreateMainLayout();
|
||||||
|
|
|
@ -31,6 +31,10 @@ HacksWidget::HacksWidget(GraphicsWindow* parent)
|
||||||
connect(parent, &GraphicsWindow::BackendChanged, this, &HacksWidget::OnBackendChanged);
|
connect(parent, &GraphicsWindow::BackendChanged, this, &HacksWidget::OnBackendChanged);
|
||||||
OnBackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
OnBackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
||||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, &HacksWidget::LoadSettings);
|
connect(&Settings::Instance(), &Settings::ConfigChanged, this, &HacksWidget::LoadSettings);
|
||||||
|
connect(m_gpu_texture_decoding, &QCheckBox::toggled, [this, parent] {
|
||||||
|
SaveSettings();
|
||||||
|
emit parent->UseGPUTextureDecodingChanged();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HacksWidget::CreateWidgets()
|
void HacksWidget::CreateWidgets()
|
||||||
|
@ -264,8 +268,8 @@ void HacksWidget::AddDescriptions()
|
||||||
static const char TR_GPU_DECODING_DESCRIPTION[] = QT_TR_NOOP(
|
static const char TR_GPU_DECODING_DESCRIPTION[] = QT_TR_NOOP(
|
||||||
"Enables texture decoding using the GPU instead of the CPU.<br><br>This may result in "
|
"Enables texture decoding using the GPU instead of the CPU.<br><br>This may result in "
|
||||||
"performance gains in some scenarios, or on systems where the CPU is the "
|
"performance gains in some scenarios, or on systems where the CPU is the "
|
||||||
"bottleneck.<br><br><dolphin_emphasis>If unsure, leave this "
|
"bottleneck.<br><br>This option is incompatible with Arbitrary Mipmap Detection.<br><br>"
|
||||||
"unchecked.</dolphin_emphasis>");
|
"<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
||||||
static const char TR_FAST_DEPTH_CALC_DESCRIPTION[] = QT_TR_NOOP(
|
static const char TR_FAST_DEPTH_CALC_DESCRIPTION[] = QT_TR_NOOP(
|
||||||
"Uses a less accurate algorithm to calculate depth values.<br><br>Causes issues in a few "
|
"Uses a less accurate algorithm to calculate depth values.<br><br>Causes issues in a few "
|
||||||
"games, but can result in a decent speed increase depending on the game and/or "
|
"games, but can result in a decent speed increase depending on the game and/or "
|
||||||
|
|
Loading…
Reference in New Issue