Skip to content

Commit

Permalink
System: Display localized trait names
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Oct 18, 2024
1 parent 57cf0f2 commit 76208f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ bool System::IsPALRegion()
return s_region == ConsoleRegion::PAL;
}

const char* System::GetTaintDisplayName(Taint taint)
std::string_view System::GetTaintDisplayName(Taint taint)
{
static constexpr const std::array<const char*, static_cast<size_t>(Taint::MaxCount)> names = {{
TRANSLATE_DISAMBIG_NOOP("System", "CPU Overclock", "Taint"),
Expand All @@ -675,7 +675,7 @@ const char* System::GetTaintDisplayName(Taint taint)
TRANSLATE_DISAMBIG_NOOP("System", "Game Patches", "Taint"),
}};

return names[static_cast<size_t>(taint)];
return Host::TranslateToStringView("System", names[static_cast<size_t>(taint)], "Taint");
}

const char* System::GetTaintName(Taint taint)
Expand Down
2 changes: 1 addition & 1 deletion src/core/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ DiscRegion GetDiscRegion();
bool IsPALRegion();

/// Taints - flags that are set on the system and only cleared on reset.
const char* GetTaintDisplayName(Taint taint);
std::string_view GetTaintDisplayName(Taint taint);
const char* GetTaintName(Taint taint);
bool HasTaint(Taint taint);
void SetTaint(Taint taint);
Expand Down

0 comments on commit 76208f5

Please sign in to comment.