GameDatabase: Use TitleCase for traits

This commit is contained in:
Stenzek 2024-02-04 16:46:47 +10:00
parent 05cbf86be0
commit f6dc80cefa
No known key found for this signature in database
2 changed files with 822 additions and 959 deletions

File diff suppressed because it is too large Load Diff

View File

@ -61,27 +61,27 @@ static constexpr const std::array<const char*, static_cast<size_t>(Compatibility
TRANSLATE_NOOP("GameListCompatibilityRating", "No Issues")}};
static constexpr const std::array<const char*, static_cast<u32>(GameDatabase::Trait::Count)> s_trait_names = {{
"forceInterpreter",
"forceSoftwareRenderer",
"forceSoftwareRendererForReadbacks",
"forceInterlacing",
"disableTrueColor",
"disableUpscaling",
"disableTextureFiltering",
"disableScaledDithering",
"disableForceNTSCTimings",
"disableWidescreen",
"disablePGXP",
"disablePGXPCulling",
"disablePGXPTextureCorrection",
"disablePGXPColorCorrection",
"disablePGXPDepthBuffer",
"forcePGXPVertexCache",
"forcePGXPCPUMode",
"forceRecompilerMemoryExceptions",
"forceRecompilerICache",
"forceRecompilerLUTFastmem",
"isLibCryptProtected",
"ForceInterpreter",
"ForceSoftwareRenderer",
"ForceSoftwareRendererForReadbacks",
"ForceInterlacing",
"DisableTrueColor",
"DisableUpscaling",
"DisableTextureFiltering",
"DisableScaledDithering",
"DisableForceNTSCTimings",
"DisableWidescreen",
"DisablePGXP",
"DisablePGXPCulling",
"DisablePGXPTextureCorrection",
"DisablePGXPColorCorrection",
"DisablePGXPDepthBuffer",
"ForcePGXPVertexCache",
"ForcePGXPCPUMode",
"ForceRecompilerMemoryExceptions",
"ForceRecompilerICache",
"ForceRecompilerLUTFastmem",
"IsLibCryptProtected",
}};
static constexpr const char* GAMEDB_YAML_FILENAME = "gamedb.yaml";
@ -993,6 +993,19 @@ bool GameDatabase::ParseYamlEntry(Entry* entry, const ryml::ConstNodeRef& value)
}
}
if (const ryml::ConstNodeRef& libcrypt = value.find_child(to_csubstr("libcrypt")); libcrypt.valid())
{
if (const std::optional libcrypt_val = StringUtil::FromChars<bool>(to_stringview(libcrypt.val()));
libcrypt_val.has_value())
{
entry->traits[static_cast<size_t>(Trait::IsLibCryptProtected)] = true;
}
else
{
Log_WarningFmt("Invalid libcrypt value in {}", entry->serial);
}
}
if (const ryml::ConstNodeRef settings = value.find_child(to_csubstr("settings"));
settings.valid() && settings.has_children())
{