Skip to content

Commit

Permalink
GameDB: Add DisablePGXPPreserveProjFP trait
Browse files Browse the repository at this point in the history
And add it to Crash Team Racing.
  • Loading branch information
stenzek committed Mar 23, 2024
1 parent 17e3e96 commit 8c09e93
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data/resources/gamedb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21128,6 +21128,8 @@ SCES-02105:
- AnalogController
- DigitalController
- NeGcon
traits:
- DisablePGXPPreserveProjFP
libcrypt: true
metadata:
publisher: "Sony"
Expand Down Expand Up @@ -21157,6 +21159,8 @@ SCUS-94426:
- AnalogController
- DigitalController
- NeGcon
traits:
- DisablePGXPPreserveProjFP
metadata:
publisher: "Sony"
developer: "Naughty Dog"
Expand All @@ -21173,6 +21177,8 @@ SCUS-94426:
linkCable: false
SCUS-94459:
name: "CTR - Crash Team Racing (USA) (Demo)"
traits:
- DisablePGXPPreserveProjFP
SLUS-01391:
name: "Cabela's Big Game Hunter - Ultimate Challenge (USA)"
controllers:
Expand Down Expand Up @@ -30290,6 +30296,8 @@ SCPS-45470:
- AnalogController
- DigitalController
- NeGcon
traits:
- DisablePGXPPreserveProjFP
metadata:
publisher: "Sony"
developer: "Naughty Dog"
Expand All @@ -30310,6 +30318,8 @@ SCPS-10118:
- AnalogController
- DigitalController
- NeGcon
traits:
- DisablePGXPPreserveProjFP
codes:
- SCPS-10118
- SCPS-91328
Expand All @@ -30329,12 +30339,16 @@ SCPS-10118:
linkCable: false
PCPX-96183:
name: "Crash Bandicoot Racing (Japan) (Demo)"
traits:
- DisablePGXPPreserveProjFP
SCPS-91230:
name: "Crash Bandicoot Racing [Playstation the Best for Family]"
controllers:
- AnalogController
- DigitalController
- NeGcon
traits:
- DisablePGXPPreserveProjFP
metadata:
publisher: "Sony"
developer: "Naughty Dog"
Expand Down
14 changes: 14 additions & 0 deletions src/core/game_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static constexpr const std::array<const char*, static_cast<u32>(GameDatabase::Tr
"DisablePGXPTextureCorrection",
"DisablePGXPColorCorrection",
"DisablePGXPDepthBuffer",
"DisablePGXPPreserveProjFP",
"ForcePGXPVertexCache",
"ForcePGXPCPUMode",
"ForceRecompilerMemoryExceptions",
Expand Down Expand Up @@ -535,6 +536,19 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes
settings.gpu_pgxp_color_correction = false;
}

if (HasTrait(Trait::DisablePGXPPreserveProjFP))
{
if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_preserve_proj_fp)
{
Host::AddIconOSDMessage(
"gamedb_disable_pgxp_texture", ICON_FA_MAGIC,
TRANSLATE_STR("OSDMessage", "PGXP projection precision preservation disabled by compatibility settings."),
osd_duration);
}

settings.gpu_pgxp_preserve_proj_fp = false;
}

if (HasTrait(Trait::ForcePGXPVertexCache))
{
if (display_osd_messages && settings.gpu_pgxp_enable && !settings.gpu_pgxp_vertex_cache)
Expand Down
1 change: 1 addition & 0 deletions src/core/game_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enum class Trait : u32
DisablePGXPTextureCorrection,
DisablePGXPColorCorrection,
DisablePGXPDepthBuffer,
DisablePGXPPreserveProjFP,
ForcePGXPVertexCache,
ForcePGXPCPUMode,
ForceRecompilerMemoryExceptions,
Expand Down

0 comments on commit 8c09e93

Please sign in to comment.