Qt: Round round texcoords only applies to 3D

Don't keep the option enabled if sprite filtering is still set to
nearest.
pull/3751/head
Stenzek 3 months ago
parent 0e0ef21d0e
commit 09008bb3a3
No known key found for this signature in database

@ -4172,17 +4172,13 @@ void FullscreenUI::DrawGraphicsSettingsPage()
const GPUTextureFilter texture_filtering = const GPUTextureFilter texture_filtering =
Settings::ParseTextureFilterName(GetEffectiveTinyStringSetting(bsi, "GPU", "TextureFilter")) Settings::ParseTextureFilterName(GetEffectiveTinyStringSetting(bsi, "GPU", "TextureFilter"))
.value_or(Settings::DEFAULT_GPU_TEXTURE_FILTER); .value_or(Settings::DEFAULT_GPU_TEXTURE_FILTER);
const GPUTextureFilter sprite_texture_filtering =
Settings::ParseTextureFilterName(GetEffectiveTinyStringSetting(bsi, "GPU", "SpriteTextureFilter"))
.value_or(texture_filtering);
DrawToggleSetting( DrawToggleSetting(
bsi, FSUI_ICONVSTR(ICON_FA_EYE_DROPPER, "Round Upscaled Texture Coordinates"), bsi, FSUI_ICONVSTR(ICON_FA_EYE_DROPPER, "Round Upscaled Texture Coordinates"),
FSUI_VSTR("Rounds texture coordinates instead of flooring when upscaling. Can fix misaligned " FSUI_VSTR("Rounds texture coordinates instead of flooring when upscaling. Can fix misaligned "
"textures in some games, but break others, and is incompatible with texture filtering."), "textures in some games, but break others, and is incompatible with texture filtering."),
"GPU", "ForceRoundTextureCoordinates", false, "GPU", "ForceRoundTextureCoordinates", false,
resolution_scale != 1 && resolution_scale != 1 && texture_filtering == GPUTextureFilter::Nearest);
(texture_filtering == GPUTextureFilter::Nearest || sprite_texture_filtering == GPUTextureFilter::Nearest));
} }
DrawToggleSetting( DrawToggleSetting(

@ -636,8 +636,6 @@ void GraphicsSettingsWidget::updateRendererDependentOptions()
!m_dialog->hasGameTrait(GameDatabase::Trait::DisableScaledInterlacing)); !m_dialog->hasGameTrait(GameDatabase::Trait::DisableScaledInterlacing));
m_ui.useSoftwareRendererForReadbacks->setEnabled( m_ui.useSoftwareRendererForReadbacks->setEnabled(
is_hardware && !m_dialog->hasGameTrait(GameDatabase::Trait::ForceSoftwareRendererForReadbacks)); is_hardware && !m_dialog->hasGameTrait(GameDatabase::Trait::ForceSoftwareRendererForReadbacks));
m_ui.forceRoundedTexcoords->setEnabled(
is_hardware && !m_dialog->hasGameTrait(GameDatabase::Trait::ForceRoundUpscaledTextureCoordinates));
m_ui.tabs->setTabEnabled(TAB_INDEX_TEXTURE_REPLACEMENTS, is_hardware); m_ui.tabs->setTabEnabled(TAB_INDEX_TEXTURE_REPLACEMENTS, is_hardware);
@ -1002,8 +1000,7 @@ void GraphicsSettingsWidget::updateResolutionDependentOptions()
Settings::ParseTextureFilterName(m_dialog->getEffectiveStringValue("GPU", "SpriteTextureFilter").c_str()) Settings::ParseTextureFilterName(m_dialog->getEffectiveStringValue("GPU", "SpriteTextureFilter").c_str())
.value_or(texture_filtering); .value_or(texture_filtering);
m_ui.forceRoundedTexcoords->setEnabled( m_ui.forceRoundedTexcoords->setEnabled(
is_hardware && scale != 1 && is_hardware && scale != 1 && texture_filtering == GPUTextureFilter::Nearest &&
(texture_filtering == GPUTextureFilter::Nearest || sprite_texture_filtering == GPUTextureFilter::Nearest) &&
!m_dialog->hasGameTrait(GameDatabase::Trait::ForceRoundUpscaledTextureCoordinates)); !m_dialog->hasGameTrait(GameDatabase::Trait::ForceRoundUpscaledTextureCoordinates));
} }

Loading…
Cancel
Save