mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-26 15:40:41 +00:00
GameDatabase: Fix compatibility rating localization
This commit is contained in:
parent
7a11b95490
commit
97d8a35108
@ -6790,16 +6790,11 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size)
|
||||
// compatibility
|
||||
ImGui::TextUnformatted(FSUI_CSTR("Compatibility: "));
|
||||
ImGui::SameLine();
|
||||
if (selected_entry->dbentry &&
|
||||
selected_entry->dbentry->compatibility != GameDatabase::CompatibilityRating::Unknown)
|
||||
{
|
||||
ImGui::Image(GetCachedTexture(selected_entry->GetCompatibilityIconFileName(), 88, 16),
|
||||
LayoutScale(88.0f, 16.0f));
|
||||
ImGui::SameLine();
|
||||
}
|
||||
ImGui::Image(GetCachedTexture(selected_entry->GetCompatibilityIconFileName(), 88, 16), LayoutScale(88.0f, 16.0f));
|
||||
ImGui::SameLine();
|
||||
ImGui::Text(" (%s)", GameDatabase::GetCompatibilityRatingDisplayName(
|
||||
selected_entry->dbentry ? selected_entry->dbentry->compatibility :
|
||||
GameDatabase::CompatibilityRating::Unknown));
|
||||
(selected_entry && selected_entry->dbentry) ? selected_entry->dbentry->compatibility :
|
||||
GameDatabase::CompatibilityRating::Unknown));
|
||||
|
||||
// play time
|
||||
ImGui::Text(FSUI_CSTR("Time Played: %s"), GameList::FormatTimespan(selected_entry->total_played_time).c_str());
|
||||
|
@ -291,7 +291,8 @@ const char* GameDatabase::GetCompatibilityRatingName(CompatibilityRating rating)
|
||||
const char* GameDatabase::GetCompatibilityRatingDisplayName(CompatibilityRating rating)
|
||||
{
|
||||
return (rating >= CompatibilityRating::Unknown && rating < CompatibilityRating::Count) ?
|
||||
Host::TranslateToCString("GameDatabase", s_compatibility_rating_display_names[static_cast<size_t>(rating)]) :
|
||||
Host::TranslateToCString("GameDatabase", s_compatibility_rating_display_names[static_cast<size_t>(rating)],
|
||||
"CompatibilityRating") :
|
||||
"";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user