GameDatabase: Rework deinterlace mode selection

The mode can either be preferred (if the user has not chosen
progressive), or force (ignore user's choice).

Also remove it from a bunch of games which apparently no longer
need it? Very strange...
This commit is contained in:
Stenzek 2024-10-19 17:02:20 +10:00
parent e4a358cacb
commit 9050098e3e
No known key found for this signature in database
3 changed files with 49 additions and 57 deletions

View File

@ -1067,7 +1067,7 @@ SLPS-01434:
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing - ForceDeinterlacing
metadata: metadata:
publisher: "ASCII Entertaiment" publisher: "ASCII Entertaiment"
developer: "ASCII Entertaiment" developer: "ASCII Entertaiment"
@ -8583,13 +8583,10 @@ SLUS-00952:
compatibility: compatibility:
rating: NoIssues rating: NoIssues
versionTested: "0.1-2433-g9089c973" versionTested: "0.1-2433-g9089c973"
comments: "Not sure if the graphical errors in \"720\" aren't present in real hardware. If isn't, please report then we can reopen the (Issues #700)."
controllers: controllers:
- AnalogController - AnalogController
- DigitalController - DigitalController
- PlayStationMouse - PlayStationMouse
traits:
- ForceInterlacing
metadata: metadata:
publisher: "Midway Home Entertainment" publisher: "Midway Home Entertainment"
developer: "Digital Eclipse Software, Inc" developer: "Digital Eclipse Software, Inc"
@ -37085,13 +37082,10 @@ SLUS-00912:
name: "Destruction Derby Raw (USA)" name: "Destruction Derby Raw (USA)"
compatibility: compatibility:
rating: NoIssues rating: NoIssues
upscalingIssues: "Menu images and car previews don't show properly"
controllers: controllers:
- AnalogController - AnalogController
- DigitalController - DigitalController
- NeGcon - NeGcon
traits:
- ForceInterlacing
metadata: metadata:
publisher: "Psygnosis" publisher: "Psygnosis"
developer: "Studio 33 Ltd" developer: "Studio 33 Ltd"
@ -37257,7 +37251,7 @@ SCES-01312:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing - ForceDeinterlacing
metadata: metadata:
publisher: "THQ" publisher: "THQ"
developer: "Shift" developer: "Shift"
@ -106252,13 +106246,10 @@ SLPS-03336:
name: "Mr. Driller G (Japan)" name: "Mr. Driller G (Japan)"
compatibility: compatibility:
rating: NoIssues rating: NoIssues
comments: "Flickering results panel and sprites after a Game Over screen."
controllers: controllers:
- AnalogController - AnalogController
- DigitalController - DigitalController
- NeGcon - NeGcon
traits:
- ForceInterlacing
metadata: metadata:
publisher: "Namco" publisher: "Namco"
developer: "Namco" developer: "Namco"
@ -112194,8 +112185,6 @@ SLPS-03553:
controllers: controllers:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits:
- ForceInterlacing
metadata: metadata:
publisher: "Bandai" publisher: "Bandai"
developer: "Denyusha & Dimps" developer: "Denyusha & Dimps"
@ -129020,8 +129009,8 @@ SLES-01211:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive" publisher: "Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129047,8 +129036,8 @@ SLUS-01260:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive" publisher: "Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129069,8 +129058,8 @@ SLES-02466:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive" publisher: "Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129097,8 +129086,8 @@ SLUS-01261:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Take 2 Interactive / Empire Interactive" publisher: "Take 2 Interactive / Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129118,8 +129107,8 @@ SLES-00259:
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive / Interplay" publisher: "Empire Interactive / Interplay"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129139,8 +129128,8 @@ SLES-00606:
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive" publisher: "Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129164,8 +129153,8 @@ SLUS-00639:
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Empire Interactive" publisher: "Empire Interactive"
developer: "Cunning Developments" developer: "Cunning Developments"
@ -129183,8 +129172,8 @@ SLUS-00639:
SLUS-90039: SLUS-90039:
name: "Pro Pinball - Timeshock! (USA) (Demo)" name: "Pro Pinball - Timeshock! (USA) (Demo)"
traits: traits:
- ForceSoftwareRenderer - ForceSoftwareRenderer # Lots of readbacks.
- ForceInterlacing - ForceDeinterlacing # Blend results in best-looking pinballs.
SLES-03962: SLES-03962:
name: "Pro Racer (Europe)" name: "Pro Racer (Europe)"
controllers: controllers:
@ -132763,7 +132752,6 @@ SLUS-00656:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing
- ForcePGXPCPUMode # Fixes affine texture mapping on floor. - ForcePGXPCPUMode # Fixes affine texture mapping on floor.
metadata: metadata:
publisher: "Mindscape" publisher: "Mindscape"
@ -145552,7 +145540,7 @@ SLPM-86750:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing - ForceDeinterlacing
codes: codes:
- SLPM-86750 - SLPM-86750
- SLPS-02120 - SLPS-02120
@ -169993,7 +169981,7 @@ SLPS-01211:
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing - ForceDeinterlacing
metadata: metadata:
publisher: "Banpresto" publisher: "Banpresto"
developer: "Banpresto" developer: "Banpresto"
@ -176130,12 +176118,11 @@ SLUS-00337:
compatibility: compatibility:
rating: NoIssues rating: NoIssues
versionTested: "0.1-986-gfc911de1" versionTested: "0.1-986-gfc911de1"
upscalingIssues: "Rendering breaks when upscaling is used."
controllers: controllers:
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing - DisableUpscaling # Rendering breaks with upscaling.
- DisableUpscaling - ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Ocean" publisher: "Ocean"
developer: "Digital Illusions CE AB" developer: "Digital Illusions CE AB"
@ -187601,10 +187588,10 @@ SLES-00483:
- AnalogController - AnalogController
- DigitalController - DigitalController
traits: traits:
- ForceInterlacing
- DisableUpscaling - DisableUpscaling
- DisablePGXP - DisablePGXP
- DisableTextureFiltering - DisableTextureFiltering
- ForceDeinterlacing # Blend results in best-looking pinballs.
metadata: metadata:
publisher: "Infogrames" publisher: "Infogrames"
developer: "Team 17" developer: "Team 17"

View File

@ -81,7 +81,7 @@ static constexpr const std::array<const char*, static_cast<size_t>(Trait::MaxCou
"ForceSoftwareRendererForReadbacks", "ForceSoftwareRendererForReadbacks",
"ForceRoundTextureCoordinates", "ForceRoundTextureCoordinates",
"ForceAccurateBlending", "ForceAccurateBlending",
"ForceInterlacing", "ForceDeinterlacing",
"DisableAutoAnalogMode", "DisableAutoAnalogMode",
"DisableTrueColor", "DisableTrueColor",
"DisableUpscaling", "DisableUpscaling",
@ -111,7 +111,7 @@ static constexpr const std::array<const char*, static_cast<size_t>(Trait::MaxCou
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Software Renderer For Readbacks", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Software Renderer For Readbacks", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Round Texture Coordinates", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Round Texture Coordinates", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Accurate Blending", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Accurate Blending", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Interlacing", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Force Deinterlacing", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable Automatic Analog Mode", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable Automatic Analog Mode", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable True Color", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable True Color", "GameDatabase::Trait"),
TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable Upscaling", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable Upscaling", "GameDatabase::Trait"),
@ -143,6 +143,7 @@ static constexpr std::array<const char*, static_cast<size_t>(Language::MaxCount)
static constexpr const char* GAMEDB_YAML_FILENAME = "gamedb.yaml"; static constexpr const char* GAMEDB_YAML_FILENAME = "gamedb.yaml";
static constexpr const char* DISCDB_YAML_FILENAME = "discdb.yaml"; static constexpr const char* DISCDB_YAML_FILENAME = "discdb.yaml";
static DisplayDeinterlacingMode DEFAULT_DEINTERLACING_MODE = DisplayDeinterlacingMode::Adaptive;
static bool s_loaded = false; static bool s_loaded = false;
static bool s_track_hashes_loaded = false; static bool s_track_hashes_loaded = false;
@ -425,20 +426,6 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes
settings.display_crop_mode = display_crop_mode.value(); settings.display_crop_mode = display_crop_mode.value();
} }
// Don't set to optimal if disable-all-enhancements is enabled.
if (display_deinterlacing_mode.has_value() &&
(display_deinterlacing_mode.value() != DisplayDeinterlacingMode::Progressive ||
!g_settings.disable_all_enhancements))
{
if (display_osd_messages && settings.display_deinterlacing_mode != display_deinterlacing_mode.value())
{
APPEND_MESSAGE_FMT(TRANSLATE_FS("GameDatabase", "Deinterlacing set to {}."),
Settings::GetDisplayDeinterlacingModeDisplayName(display_deinterlacing_mode.value()));
}
settings.display_deinterlacing_mode = display_deinterlacing_mode.value();
}
if (HasTrait(Trait::ForceInterpreter)) if (HasTrait(Trait::ForceInterpreter))
{ {
if (display_osd_messages && settings.cpu_execution_mode != CPUExecutionMode::Interpreter) if (display_osd_messages && settings.cpu_execution_mode != CPUExecutionMode::Interpreter)
@ -476,12 +463,30 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes
settings.gpu_accurate_blending = true; settings.gpu_accurate_blending = true;
} }
if (HasTrait(Trait::ForceInterlacing) && settings.display_deinterlacing_mode == DisplayDeinterlacingMode::Progressive) if (HasTrait(Trait::ForceDeinterlacing))
{ {
if (display_osd_messages) const DisplayDeinterlacingMode new_mode = display_deinterlacing_mode.value_or(DEFAULT_DEINTERLACING_MODE);
APPEND_MESSAGE(TRANSLATE_SV("GameDatabase", "Interlaced rendering enabled.")); if (display_osd_messages && settings.display_deinterlacing_mode != new_mode)
{
APPEND_MESSAGE_FMT(TRANSLATE_FS("GameDatabase", "Deinterlacing set to {}."),
Settings::GetDisplayDeinterlacingModeDisplayName(display_deinterlacing_mode.value()));
}
settings.display_deinterlacing_mode = DisplayDeinterlacingMode::Adaptive; settings.display_deinterlacing_mode = new_mode;
}
else if (display_deinterlacing_mode.has_value())
{
// If the user has it set to progressive, then preserve that.
if (settings.display_deinterlacing_mode != DisplayDeinterlacingMode::Progressive)
{
if (display_osd_messages && settings.display_deinterlacing_mode != display_deinterlacing_mode.value())
{
APPEND_MESSAGE_FMT(TRANSLATE_FS("GameDatabase", "Deinterlacing set to {}."),
Settings::GetDisplayDeinterlacingModeDisplayName(display_deinterlacing_mode.value()));
}
settings.display_deinterlacing_mode = display_deinterlacing_mode.value();
}
} }
if (HasTrait(Trait::DisableTrueColor)) if (HasTrait(Trait::DisableTrueColor))

View File

@ -38,7 +38,7 @@ enum class Trait : u32
ForceSoftwareRendererForReadbacks, ForceSoftwareRendererForReadbacks,
ForceRoundUpscaledTextureCoordinates, ForceRoundUpscaledTextureCoordinates,
ForceAccurateBlending, ForceAccurateBlending,
ForceInterlacing, ForceDeinterlacing,
DisableAutoAnalogMode, DisableAutoAnalogMode,
DisableTrueColor, DisableTrueColor,
DisableUpscaling, DisableUpscaling,