From 932474a7d6331d18a5d91ffc37ba9f0afa283651 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Sun, 12 May 2024 21:12:41 +0200 Subject: [PATCH] GameDB: Adjust mipmap and trilinear behavior. --- pcsx2/GameDatabase.cpp | 20 ++++++-------------- pcsx2/GameDatabase.h | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 97bab400ce..2b6d28f665 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -370,13 +370,13 @@ static const char* s_gs_hw_fix_names[] = { "textureInsideRT", "alignSprite", "mergeSprite", + "mipmap", "wildArmsHack", "bilinearUpscale", "nativePaletteDraw", "estimateTextureRegion", "PCRTCOffsets", "PCRTCOverscan", - "mipmap", "trilinearFiltering", "skipDrawStart", "skipDrawEnd", @@ -621,7 +621,7 @@ bool GameDatabaseSchema::GameEntry::configMatchesHWFix(const Pcsx2Config::GSOpti return (static_cast(config.PCRTCOverscan) == value); case GSHWFixId::Mipmap: - return (config.HWMipmap == HWMipmapLevel::Automatic || static_cast(config.HWMipmap) == value); + return (static_cast(config.HWMipmap) == value); case GSHWFixId::TrilinearFiltering: return (config.TriFilter == TriFiltering::Automatic || static_cast(config.TriFilter) == value); @@ -775,16 +775,8 @@ void GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions& break; case GSHWFixId::Mipmap: - { - if (value >= 0 && value <= static_cast(HWMipmapLevel::Full)) - { - if (config.HWMipmap == HWMipmapLevel::Automatic) - config.HWMipmap = static_cast(value); - else if (config.HWMipmap == HWMipmapLevel::Off) - Console.Warning("[GameDB] Game requires mipmapping but it has been force disabled."); - } - } - break; + config.HWMipmap = (value > 0); + break; case GSHWFixId::TrilinearFiltering: { @@ -792,8 +784,8 @@ void GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions& { if (config.TriFilter == TriFiltering::Automatic) config.TriFilter = static_cast(value); - else if (config.TriFilter == TriFiltering::Off) - Console.Warning("[GameDB] Game requires trilinear filtering but it has been force disabled."); + else if (config.TriFilter > TriFiltering::Off) + Console.Warning("[GameDB] Game requires trilinear filtering to be disabled."); } } break; diff --git a/pcsx2/GameDatabase.h b/pcsx2/GameDatabase.h index 1a7dfeb06a..9c3dd2176e 100644 --- a/pcsx2/GameDatabase.h +++ b/pcsx2/GameDatabase.h @@ -53,6 +53,7 @@ namespace GameDatabaseSchema TextureInsideRT, AlignSprite, MergeSprite, + Mipmap, WildArmsHack, BilinearUpscale, NativePaletteDraw, @@ -61,7 +62,6 @@ namespace GameDatabaseSchema PCRTCOverscan, // integer settings - Mipmap, TrilinearFiltering, SkipDrawStart, SkipDrawEnd,