From d9dbf2c5e914e5110c56f840dbe395fabf120715 Mon Sep 17 00:00:00 2001 From: RedDevilus Date: Sun, 2 Jul 2023 11:40:13 +0200 Subject: [PATCH] Qt: Add Polish flag Polish were neglected, that ends now. Flag will be used when it sees a Polish entry in the gamelist. Fixes https://github.com/PCSX2/pcsx2/issues/9137 Bumps the gamelist cache version from 32 to 33 Adds to enumeration And make it visible in both gamelist and per-game summary view Update GameList.cpp --- bin/resources/icons/flags/PAL-PL.png | Bin 0 -> 487 bytes pcsx2-qt/Settings/GameSummaryWidget.ui | 5 +++++ pcsx2/GameList.cpp | 6 ++++-- pcsx2/GameList.h | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 bin/resources/icons/flags/PAL-PL.png diff --git a/bin/resources/icons/flags/PAL-PL.png b/bin/resources/icons/flags/PAL-PL.png new file mode 100644 index 0000000000000000000000000000000000000000..3b6d000a703ee716e8af9a576f0974cbf187530f GIT binary patch literal 487 zcmeAS@N?(olHy`uVBq!ia0y~yV1B{Cz*NY@3=~;&xxfQRaR&H=xc>kD|6SL-J0doP zEnU3~42&~9T^vIy7~h^}6l5?EU{dg2_avx}_k9Z+3s48Oz>AM*PtOO1(*mqtyl!}c YI#t8XJGGa`FoGh%)78&qol`;+0JP@Qng9R* literal 0 HcmV?d00001 diff --git a/pcsx2-qt/Settings/GameSummaryWidget.ui b/pcsx2-qt/Settings/GameSummaryWidget.ui index 0f23cb6fe8..6536255cea 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.ui +++ b/pcsx2-qt/Settings/GameSummaryWidget.ui @@ -268,6 +268,11 @@ PAL-P (Portugal) + + + PAL-PL (Poland) + + PAL-R (Russia) diff --git a/pcsx2/GameList.cpp b/pcsx2/GameList.cpp index 17a6d6f432..a04a4581fd 100644 --- a/pcsx2/GameList.cpp +++ b/pcsx2/GameList.cpp @@ -48,7 +48,7 @@ namespace GameList enum : u32 { GAME_LIST_CACHE_SIGNATURE = 0x45434C47, - GAME_LIST_CACHE_VERSION = 32, + GAME_LIST_CACHE_VERSION = 33, PLAYED_TIME_SERIAL_LENGTH = 32, @@ -117,7 +117,7 @@ const char* GameList::RegionToString(Region region) { static std::array(Region::Count)> names = {{"NTSC-B", "NTSC-C", "NTSC-HK", "NTSC-J", "NTSC-K", "NTSC-T", "NTSC-U", "Other", "PAL-A", "PAL-AF", "PAL-AU", "PAL-BE", "PAL-E", "PAL-F", "PAL-FI", "PAL-G", "PAL-GR", "PAL-I", "PAL-IN", "PAL-M", - "PAL-NL", "PAL-NO", "PAL-P", "PAL-R", "PAL-S", "PAL-SC", "PAL-SW", "PAL-SWI", "PAL-UK"}}; + "PAL-NL", "PAL-NO", "PAL-P", "PAL-PL", "PAL-R", "PAL-S", "PAL-SC", "PAL-SW", "PAL-SWI", "PAL-UK"}}; return names[static_cast(region)]; } @@ -266,6 +266,8 @@ GameList::Region GameList::ParseDatabaseRegion(const std::string_view& db_region return Region::PAL_NL; else if (StringUtil::StartsWith(db_region, "PAL-NO")) return Region::PAL_NO; + else if (StringUtil::StartsWith(db_region, "PAL-PL")) + return Region::PAL_PL; else if (StringUtil::StartsWith(db_region, "PAL-P")) return Region::PAL_P; else if (StringUtil::StartsWith(db_region, "PAL-R")) diff --git a/pcsx2/GameList.h b/pcsx2/GameList.h index 8c6e77baab..8b77c2650e 100644 --- a/pcsx2/GameList.h +++ b/pcsx2/GameList.h @@ -68,6 +68,7 @@ namespace GameList PAL_NL, PAL_NO, PAL_P, + PAL_PL, PAL_R, PAL_S, PAL_SC,