@@ -664,10 +664,10 @@ bool GameDatabaseSchema::GameEntry::configMatchesHWFix(const Pcsx2Config::GSOpti
664664 return (config.GPUPaletteConversion == ((value > 1 ) ? (config.TexturePreloading == TexturePreloadingLevel::Full) : (value != 0 )));
665665
666666 case GSHWFixId::MinimumBlendingLevel:
667- return (static_cast <int >(config.AccurateBlendingUnit ) >= value);
667+ return (config. AccurateBlendingUnit == AccBlendLevel::Automatic || static_cast <int >(config.AccurateBlendingUnit ) >= value);
668668
669669 case GSHWFixId::MaximumBlendingLevel:
670- return (static_cast <int >(config.AccurateBlendingUnit ) <= value);
670+ return (config. AccurateBlendingUnit == AccBlendLevel::Automatic || static_cast <int >(config.AccurateBlendingUnit ) <= value);
671671
672672 case GSHWFixId::RecommendedBlendingLevel:
673673 return true ;
@@ -868,21 +868,23 @@ void GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
868868
869869 case GSHWFixId::MinimumBlendingLevel:
870870 {
871- if (value >= 0 && value <= static_cast <int >(AccBlendLevel::Maximum))
872- config.AccurateBlendingUnit = std::max (config. AccurateBlendingUnit , static_cast <AccBlendLevel>(value) );
871+ if (value >= 0 && value <= static_cast <int >(AccBlendLevel::Maximum) && config. AccurateBlendingUnit == AccBlendLevel::Automatic )
872+ config.AccurateBlendingUnit = static_cast <AccBlendLevel>(value);
873873 }
874874 break ;
875875
876876 case GSHWFixId::MaximumBlendingLevel:
877877 {
878- if (value >= 0 && value <= static_cast <int >(AccBlendLevel::Maximum))
879- config.AccurateBlendingUnit = std::min (config. AccurateBlendingUnit , static_cast <AccBlendLevel>(value) );
878+ if (value >= 0 && value <= static_cast <int >(AccBlendLevel::Maximum) && config. AccurateBlendingUnit == AccBlendLevel::Automatic )
879+ config.AccurateBlendingUnit = static_cast <AccBlendLevel>(value);
880880 }
881881 break ;
882882
883883 case GSHWFixId::RecommendedBlendingLevel:
884884 {
885- if (!is_sw_renderer && value >= 0 && value <= static_cast <int >(AccBlendLevel::Maximum) && static_cast <int >(EmuConfig.GS .AccurateBlendingUnit ) < value)
885+ // Need to increment by 1 because Automatic is -1.
886+ const int blend_level = static_cast <int >(config.AccurateBlendingUnit ) + 1 ;
887+ if (!is_sw_renderer && value >= static_cast <int >(AccBlendLevel::Automatic) && value <= static_cast <int >(AccBlendLevel::Maximum) && blend_level < value)
886888 {
887889 Host::AddKeyedOSDMessage (" HWBlendingWarning" ,
888890 fmt::format (TRANSLATE_FS (" GameDatabase" ,
@@ -891,8 +893,7 @@ void GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
891893 " You can adjust the blending level in Game Properties to improve\n "
892894 " graphical quality, but this will increase system requirements." ),
893895 ICON_FA_PAINTBRUSH,
894- Pcsx2Config::GSOptions::BlendingLevelNames[static_cast <int >(
895- EmuConfig.GS .AccurateBlendingUnit )],
896+ Pcsx2Config::GSOptions::BlendingLevelNames[blend_level],
896897 Pcsx2Config::GSOptions::BlendingLevelNames[value]),
897898 Host::OSD_WARNING_DURATION);
898899 }
0 commit comments