diff --git a/data/resources/gamedb.yaml b/data/resources/gamedb.yaml index 0a3672fb7..2e3b7a8cb 100644 --- a/data/resources/gamedb.yaml +++ b/data/resources/gamedb.yaml @@ -1067,7 +1067,7 @@ SLPS-01434: controllers: - DigitalController traits: - - ForceInterlacing + - ForceDeinterlacing metadata: publisher: "ASCII Entertaiment" developer: "ASCII Entertaiment" @@ -8583,13 +8583,10 @@ SLUS-00952: compatibility: rating: NoIssues 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: - AnalogController - DigitalController - PlayStationMouse - traits: - - ForceInterlacing metadata: publisher: "Midway Home Entertainment" developer: "Digital Eclipse Software, Inc" @@ -37085,13 +37082,10 @@ SLUS-00912: name: "Destruction Derby Raw (USA)" compatibility: rating: NoIssues - upscalingIssues: "Menu images and car previews don't show properly" controllers: - AnalogController - DigitalController - NeGcon - traits: - - ForceInterlacing metadata: publisher: "Psygnosis" developer: "Studio 33 Ltd" @@ -37257,7 +37251,7 @@ SCES-01312: - AnalogController - DigitalController traits: - - ForceInterlacing + - ForceDeinterlacing metadata: publisher: "THQ" developer: "Shift" @@ -106252,13 +106246,10 @@ SLPS-03336: name: "Mr. Driller G (Japan)" compatibility: rating: NoIssues - comments: "Flickering results panel and sprites after a Game Over screen." controllers: - AnalogController - DigitalController - NeGcon - traits: - - ForceInterlacing metadata: publisher: "Namco" developer: "Namco" @@ -112194,8 +112185,6 @@ SLPS-03553: controllers: - AnalogController - DigitalController - traits: - - ForceInterlacing metadata: publisher: "Bandai" developer: "Denyusha & Dimps" @@ -129020,8 +129009,8 @@ SLES-01211: - AnalogController - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive" developer: "Cunning Developments" @@ -129047,8 +129036,8 @@ SLUS-01260: - AnalogController - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive" developer: "Cunning Developments" @@ -129069,8 +129058,8 @@ SLES-02466: - AnalogController - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive" developer: "Cunning Developments" @@ -129097,8 +129086,8 @@ SLUS-01261: - AnalogController - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Take 2 Interactive / Empire Interactive" developer: "Cunning Developments" @@ -129118,8 +129107,8 @@ SLES-00259: controllers: - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive / Interplay" developer: "Cunning Developments" @@ -129139,8 +129128,8 @@ SLES-00606: controllers: - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive" developer: "Cunning Developments" @@ -129164,8 +129153,8 @@ SLUS-00639: controllers: - DigitalController traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Empire Interactive" developer: "Cunning Developments" @@ -129183,8 +129172,8 @@ SLUS-00639: SLUS-90039: name: "Pro Pinball - Timeshock! (USA) (Demo)" traits: - - ForceSoftwareRenderer - - ForceInterlacing + - ForceSoftwareRenderer # Lots of readbacks. + - ForceDeinterlacing # Blend results in best-looking pinballs. SLES-03962: name: "Pro Racer (Europe)" controllers: @@ -132763,7 +132752,6 @@ SLUS-00656: - AnalogController - DigitalController traits: - - ForceInterlacing - ForcePGXPCPUMode # Fixes affine texture mapping on floor. metadata: publisher: "Mindscape" @@ -145552,7 +145540,7 @@ SLPM-86750: - AnalogController - DigitalController traits: - - ForceInterlacing + - ForceDeinterlacing codes: - SLPM-86750 - SLPS-02120 @@ -169993,7 +169981,7 @@ SLPS-01211: controllers: - DigitalController traits: - - ForceInterlacing + - ForceDeinterlacing metadata: publisher: "Banpresto" developer: "Banpresto" @@ -176130,12 +176118,11 @@ SLUS-00337: compatibility: rating: NoIssues versionTested: "0.1-986-gfc911de1" - upscalingIssues: "Rendering breaks when upscaling is used." controllers: - DigitalController traits: - - ForceInterlacing - - DisableUpscaling + - DisableUpscaling # Rendering breaks with upscaling. + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Ocean" developer: "Digital Illusions CE AB" @@ -187601,10 +187588,10 @@ SLES-00483: - AnalogController - DigitalController traits: - - ForceInterlacing - DisableUpscaling - DisablePGXP - DisableTextureFiltering + - ForceDeinterlacing # Blend results in best-looking pinballs. metadata: publisher: "Infogrames" developer: "Team 17" diff --git a/src/core/game_database.cpp b/src/core/game_database.cpp index f22c155e7..0940d02cd 100644 --- a/src/core/game_database.cpp +++ b/src/core/game_database.cpp @@ -81,7 +81,7 @@ static constexpr const std::array(Trait::MaxCou "ForceSoftwareRendererForReadbacks", "ForceRoundTextureCoordinates", "ForceAccurateBlending", - "ForceInterlacing", + "ForceDeinterlacing", "DisableAutoAnalogMode", "DisableTrueColor", "DisableUpscaling", @@ -111,7 +111,7 @@ static constexpr const std::array(Trait::MaxCou 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 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 True Color", "GameDatabase::Trait"), TRANSLATE_DISAMBIG_NOOP("GameDatabase", "Disable Upscaling", "GameDatabase::Trait"), @@ -143,6 +143,7 @@ static constexpr std::array(Language::MaxCount) static constexpr const char* GAMEDB_YAML_FILENAME = "gamedb.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_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(); } - // 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 (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; } - if (HasTrait(Trait::ForceInterlacing) && settings.display_deinterlacing_mode == DisplayDeinterlacingMode::Progressive) + if (HasTrait(Trait::ForceDeinterlacing)) { - if (display_osd_messages) - APPEND_MESSAGE(TRANSLATE_SV("GameDatabase", "Interlaced rendering enabled.")); + const DisplayDeinterlacingMode new_mode = display_deinterlacing_mode.value_or(DEFAULT_DEINTERLACING_MODE); + 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)) diff --git a/src/core/game_database.h b/src/core/game_database.h index 59f0d450d..03a825e98 100644 --- a/src/core/game_database.h +++ b/src/core/game_database.h @@ -38,7 +38,7 @@ enum class Trait : u32 ForceSoftwareRendererForReadbacks, ForceRoundUpscaledTextureCoordinates, ForceAccurateBlending, - ForceInterlacing, + ForceDeinterlacing, DisableAutoAnalogMode, DisableTrueColor, DisableUpscaling,