mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-16 04:08:48 +00:00
GameList: Add RegionToFlagFilename function to map regions to flag filenames
Signed-off-by: SternXD <stern@sidestore.io>
This commit is contained in:
parent
359d552245
commit
36ffe3a521
@ -150,6 +150,44 @@ const char* GameList::RegionToString(Region region, bool translate)
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* GameList::RegionToFlagFilename(Region region)
|
||||||
|
{
|
||||||
|
static constexpr std::array<const char*, static_cast<int>(Region::Count)> flag_names = {
|
||||||
|
"br", // NTSC-B
|
||||||
|
"cn", // NTSC-C
|
||||||
|
"hk", // NTSC-HK
|
||||||
|
"jp", // NTSC-J
|
||||||
|
"kr", // NTSC-K
|
||||||
|
"tw", // NTSC-T
|
||||||
|
"us", // NTSC-U
|
||||||
|
"Other", // Other
|
||||||
|
"au", // PAL-A
|
||||||
|
"za", // PAL-AF
|
||||||
|
"at", // PAL-AU
|
||||||
|
"be", // PAL-BE
|
||||||
|
"eu", // PAL-E
|
||||||
|
"fr", // PAL-F
|
||||||
|
"fi", // PAL-FI
|
||||||
|
"de", // PAL-G
|
||||||
|
"gr", // PAL-GR
|
||||||
|
"it", // PAL-I
|
||||||
|
"in", // PAL-IN
|
||||||
|
"eu", // PAL-M
|
||||||
|
"nl", // PAL-NL
|
||||||
|
"no", // PAL-NO
|
||||||
|
"pt", // PAL-P
|
||||||
|
"pl", // PAL-PL
|
||||||
|
"ru", // PAL-R
|
||||||
|
"es", // PAL-S
|
||||||
|
"scn", // PAL-SC
|
||||||
|
"se", // PAL-SW
|
||||||
|
"ch", // PAL-SWI
|
||||||
|
"gb", // PAL-UK
|
||||||
|
};
|
||||||
|
|
||||||
|
return flag_names.at(static_cast<int>(region));
|
||||||
|
}
|
||||||
|
|
||||||
const char* GameList::EntryCompatibilityRatingToString(CompatibilityRating rating, bool translate)
|
const char* GameList::EntryCompatibilityRatingToString(CompatibilityRating rating, bool translate)
|
||||||
{
|
{
|
||||||
const char* name = "";
|
const char* name = "";
|
||||||
|
|||||||
@ -106,6 +106,7 @@ namespace GameList
|
|||||||
|
|
||||||
const char* EntryTypeToString(EntryType type, bool translate);
|
const char* EntryTypeToString(EntryType type, bool translate);
|
||||||
const char* RegionToString(Region region, bool translate);
|
const char* RegionToString(Region region, bool translate);
|
||||||
|
const char* RegionToFlagFilename(Region region);
|
||||||
const char* EntryCompatibilityRatingToString(CompatibilityRating rating, bool translate);
|
const char* EntryCompatibilityRatingToString(CompatibilityRating rating, bool translate);
|
||||||
|
|
||||||
/// Fills in boot parameters (iso or elf) based on the game list entry.
|
/// Fills in boot parameters (iso or elf) based on the game list entry.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user