diff --git a/pcsx2-qt/GameList/GameListModel.cpp b/pcsx2-qt/GameList/GameListModel.cpp index 03bc211c90..c1aba7d9c3 100644 --- a/pcsx2-qt/GameList/GameListModel.cpp +++ b/pcsx2-qt/GameList/GameListModel.cpp @@ -283,7 +283,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const } case Column_Region: { - return regionArray[static_cast(ge->region)].pixmap; + return m_region_pixmaps[static_cast(ge->region)]; } case Column_Compatibility: @@ -456,92 +456,12 @@ void GameListModel::loadCommonImages() m_type_exe_pixmap = QIcon(QStringLiteral(":/icons/applications-system-24.png")).pixmap(QSize(24, 24)); m_type_playlist_pixmap = QIcon(QStringLiteral(":/icons/address-book-new-22.png")).pixmap(QSize(22, 22)); - regionArray[Region::NTSC_B].regionindex = NTSC-B; - regionArray[Region::NTSC_B].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-b.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_C].regionindex = NTSC-C; - regionArray[Region::NTSC_C].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-c.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_HK].regionindex = NTSC-HK; - regionArray[Region::NTSC_HK].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-hk.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_J].regionindex = NTSC-J; - regionArray[Region::NTSC_J].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-jp.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_K].regionindex = NTSC-K; - regionArray[Region::NTSC_K].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-k.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_T].regionindex = NTSC-T; - regionArray[Region::NTSC_T].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-t.png")).pixmap(QSize(42, 30)); - - regionArray[Region::NTSC_U].regionindex = NTSC-U; - regionArray[Region::NTSC_U].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-us.png")).pixmap(QSize(42, 30)); - - regionArray[Region::Other].regionindex = Other; - regionArray[Region::Other].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-other.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_A].regionindex = PAL-A; - regionArray[Region::PAL_A].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-a.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_AF].regionindex = NTSC-AF; - regionArray[Region::PAL_AF].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-af.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_AU].regionindex = PAL-AU; - regionArray[Region::PAL_AU].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-au.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_BE].regionindex = PAL-BE; - regionArray[Region::PAL_BE].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-be.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_E].regionindex = PAL-E; - regionArray[Region::PAL_E].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-eu.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_F].regionindex = PAL-F; - regionArray[Region::PAL_F].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-f.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_FI].regionindex = PAL-FI; - regionArray[Region::PAL_FI].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-fi.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_G].regionindex = PAL-G; - regionArray[Region::PAL_G].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-g.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_GR].regionindex = PAL-GR; - regionArray[Region::PAL_GR].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-gr.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_I].regionindex = PAL-I; - regionArray[Region::PAL_I].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-i.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_IN].regionindex = PAL-IN; - regionArray[Region::PAL_IN].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-in.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_M].regionindex = PAL-M; - regionArray[Region::PAL_M].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-eu.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_NL].regionindex = PAL-NL; - regionArray[Region::PAL_NL].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-nl.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_NO].regionindex = PAL-NO; - regionArray[Region::PAL_NO].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-no.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_P].regionindex = PAL-P; - regionArray[Region::PAL_P].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-p.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_R].regionindex = PAL-R; - regionArray[Region::PAL_R].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-r.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_S].regionindex = PAL-S; - regionArray[Region::PAL_S].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-s.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_SC].regionindex = PAL-SC; - regionArray[Region::PAL_SC].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-sc.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_SW].regionindex = PAL-SW; - regionArray[Region::PAL_SW].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-sw.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_SWI].regionindex = PAL-SWI; - regionArray[Region::PAL_SWI].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-swi.png")).pixmap(QSize(42, 30)); - - regionArray[Region::PAL_UK].regionindex = PAL-UK; - regionArray[Region::PAL_UK].flagimage = QIcon(QStringLiteral(":/icons/flags/flag-uk.png")).pixmap(QSize(42, 30)); +for (u32 i = 0; i < static_cast(GameList::Region::Count); i++) + { + m_region_pixmaps[i] = QIcon( + QStringLiteral(":/icons/flags/%1.png").arg(GameList::RegionToString(static_cast(i)))) + .pixmap(QSize(42, 30)); + } for (u32 i = 1; i < GameList::CompatibilityRatingCount; i++) m_compatibility_pixmaps[i].load(QStringLiteral(":/icons/star-%1.png").arg(i - 1)); diff --git a/pcsx2-qt/GameList/GameListModel.h b/pcsx2-qt/GameList/GameListModel.h index 3e65e30d7e..a782a5fc94 100644 --- a/pcsx2-qt/GameList/GameListModel.h +++ b/pcsx2-qt/GameList/GameListModel.h @@ -73,11 +73,6 @@ public: private: void loadCommonImages(); -struct regionStruct { - Region regionindex; - QPixmap flagimage; -} - regionStruct regionArray[100]; void setColumnDisplayNames(); float m_cover_scale = 1.0f; @@ -89,7 +84,7 @@ struct regionStruct { QPixmap m_type_disc_with_settings_pixmap; QPixmap m_type_exe_pixmap; QPixmap m_type_playlist_pixmap; - + QPixmap m_region_pixmaps[static_cast(GameList::Region::Count)]; QPixmap m_placeholder_pixmap; std::array(GameList::CompatibilityRatingCount)> m_compatibility_pixmaps; diff --git a/pcsx2-qt/resources/icons/flags/flag-b.png b/pcsx2-qt/resources/icons/flags/NTSC-B.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-b.png rename to pcsx2-qt/resources/icons/flags/NTSC-B.png diff --git a/pcsx2-qt/resources/icons/flags/flag-c.png b/pcsx2-qt/resources/icons/flags/NTSC-C.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-c.png rename to pcsx2-qt/resources/icons/flags/NTSC-C.png diff --git a/pcsx2-qt/resources/icons/flags/flag-hk.png b/pcsx2-qt/resources/icons/flags/NTSC-HK.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-hk.png rename to pcsx2-qt/resources/icons/flags/NTSC-HK.png diff --git a/pcsx2-qt/resources/icons/flags/flag-jp.png b/pcsx2-qt/resources/icons/flags/NTSC-J.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-jp.png rename to pcsx2-qt/resources/icons/flags/NTSC-J.png diff --git a/pcsx2-qt/resources/icons/flags/flag-k.png b/pcsx2-qt/resources/icons/flags/NTSC-K.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-k.png rename to pcsx2-qt/resources/icons/flags/NTSC-K.png diff --git a/pcsx2-qt/resources/icons/flags/flag-t.png b/pcsx2-qt/resources/icons/flags/NTSC-T.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-t.png rename to pcsx2-qt/resources/icons/flags/NTSC-T.png diff --git a/pcsx2-qt/resources/icons/flags/flag-us.png b/pcsx2-qt/resources/icons/flags/NTSC-U.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-us.png rename to pcsx2-qt/resources/icons/flags/NTSC-U.png diff --git a/pcsx2-qt/resources/icons/flags/flag-other.png b/pcsx2-qt/resources/icons/flags/Other.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-other.png rename to pcsx2-qt/resources/icons/flags/Other.png diff --git a/pcsx2-qt/resources/icons/flags/flag-a.png b/pcsx2-qt/resources/icons/flags/PAL-A.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-a.png rename to pcsx2-qt/resources/icons/flags/PAL-A.png diff --git a/pcsx2-qt/resources/icons/flags/flag-af.png b/pcsx2-qt/resources/icons/flags/PAL-AF.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-af.png rename to pcsx2-qt/resources/icons/flags/PAL-AF.png diff --git a/pcsx2-qt/resources/icons/flags/flag-au.png b/pcsx2-qt/resources/icons/flags/PAL-AU.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-au.png rename to pcsx2-qt/resources/icons/flags/PAL-AU.png diff --git a/pcsx2-qt/resources/icons/flags/flag-be.png b/pcsx2-qt/resources/icons/flags/PAL-BE.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-be.png rename to pcsx2-qt/resources/icons/flags/PAL-BE.png diff --git a/pcsx2-qt/resources/icons/flags/flag-eu.png b/pcsx2-qt/resources/icons/flags/PAL-E.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-eu.png rename to pcsx2-qt/resources/icons/flags/PAL-E.png diff --git a/pcsx2-qt/resources/icons/flags/flag-f.png b/pcsx2-qt/resources/icons/flags/PAL-F.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-f.png rename to pcsx2-qt/resources/icons/flags/PAL-F.png diff --git a/pcsx2-qt/resources/icons/flags/flag-fi.png b/pcsx2-qt/resources/icons/flags/PAL-FI.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-fi.png rename to pcsx2-qt/resources/icons/flags/PAL-FI.png diff --git a/pcsx2-qt/resources/icons/flags/flag-g.png b/pcsx2-qt/resources/icons/flags/PAL-G.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-g.png rename to pcsx2-qt/resources/icons/flags/PAL-G.png diff --git a/pcsx2-qt/resources/icons/flags/flag-gr.png b/pcsx2-qt/resources/icons/flags/PAL-GR.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-gr.png rename to pcsx2-qt/resources/icons/flags/PAL-GR.png diff --git a/pcsx2-qt/resources/icons/flags/flag-i.png b/pcsx2-qt/resources/icons/flags/PAL-I.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-i.png rename to pcsx2-qt/resources/icons/flags/PAL-I.png diff --git a/pcsx2-qt/resources/icons/flags/flag-in.png b/pcsx2-qt/resources/icons/flags/PAL-IN.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-in.png rename to pcsx2-qt/resources/icons/flags/PAL-IN.png diff --git a/pcsx2-qt/resources/icons/flags/PAL-M.png b/pcsx2-qt/resources/icons/flags/PAL-M.png new file mode 100644 index 0000000000..55da529a01 Binary files /dev/null and b/pcsx2-qt/resources/icons/flags/PAL-M.png differ diff --git a/pcsx2-qt/resources/icons/flags/flag-nl.png b/pcsx2-qt/resources/icons/flags/PAL-NL.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-nl.png rename to pcsx2-qt/resources/icons/flags/PAL-NL.png diff --git a/pcsx2-qt/resources/icons/flags/flag-no.png b/pcsx2-qt/resources/icons/flags/PAL-NO.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-no.png rename to pcsx2-qt/resources/icons/flags/PAL-NO.png diff --git a/pcsx2-qt/resources/icons/flags/flag-p.png b/pcsx2-qt/resources/icons/flags/PAL-P.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-p.png rename to pcsx2-qt/resources/icons/flags/PAL-P.png diff --git a/pcsx2-qt/resources/icons/flags/flag-r.png b/pcsx2-qt/resources/icons/flags/PAL-R.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-r.png rename to pcsx2-qt/resources/icons/flags/PAL-R.png diff --git a/pcsx2-qt/resources/icons/flags/flag-s.png b/pcsx2-qt/resources/icons/flags/PAL-S.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-s.png rename to pcsx2-qt/resources/icons/flags/PAL-S.png diff --git a/pcsx2-qt/resources/icons/flags/flag-sc.png b/pcsx2-qt/resources/icons/flags/PAL-SC.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-sc.png rename to pcsx2-qt/resources/icons/flags/PAL-SC.png diff --git a/pcsx2-qt/resources/icons/flags/flag-sw.png b/pcsx2-qt/resources/icons/flags/PAL-SW.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-sw.png rename to pcsx2-qt/resources/icons/flags/PAL-SW.png diff --git a/pcsx2-qt/resources/icons/flags/flag-swi.png b/pcsx2-qt/resources/icons/flags/PAL-SWI.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-swi.png rename to pcsx2-qt/resources/icons/flags/PAL-SWI.png diff --git a/pcsx2-qt/resources/icons/flags/flag-uk.png b/pcsx2-qt/resources/icons/flags/PAL-UK.png similarity index 100% rename from pcsx2-qt/resources/icons/flags/flag-uk.png rename to pcsx2-qt/resources/icons/flags/PAL-UK.png diff --git a/pcsx2-qt/resources/resources.qrc b/pcsx2-qt/resources/resources.qrc index 3950d232b0..550678036c 100644 --- a/pcsx2-qt/resources/resources.qrc +++ b/pcsx2-qt/resources/resources.qrc @@ -45,35 +45,36 @@ icons/black/svg/window-2-line.svg icons/black/index.theme icons/discord.png - icons/flags/flag-a.png - icons/flags/flag-af.png - icons/flags/flag-au.png - icons/flags/flag-b.png - icons/flags/flag-be.png - icons/flags/flag-c.png icons/flags/flag-cn.png - icons/flags/flag-eu.png - icons/flags/flag-f.png - icons/flags/flag-fi.png - icons/flags/flag-g.png - icons/flags/flag-gr.png - icons/flags/flag-hk.png - icons/flags/flag-i.png - icons/flags/flag-in.png - icons/flags/flag-jp.png - icons/flags/flag-k.png - icons/flags/flag-nl.png - icons/flags/flag-no.png - icons/flags/flag-other.png - icons/flags/flag-p.png - icons/flags/flag-r.png - icons/flags/flag-s.png - icons/flags/flag-sc.png - icons/flags/flag-sw.png - icons/flags/flag-swi.png - icons/flags/flag-t.png - icons/flags/flag-uk.png - icons/flags/flag-us.png + icons/flags/NTSC-B.png + icons/flags/NTSC-C.png + icons/flags/NTSC-HK.png + icons/flags/NTSC-J.png + icons/flags/NTSC-K.png + icons/flags/NTSC-T.png + icons/flags/NTSC-U.png + icons/flags/Other.png + icons/flags/PAL-A.png + icons/flags/PAL-AF.png + icons/flags/PAL-AU.png + icons/flags/PAL-BE.png + icons/flags/PAL-E.png + icons/flags/PAL-F.png + icons/flags/PAL-FI.png + icons/flags/PAL-G.png + icons/flags/PAL-GR.png + icons/flags/PAL-I.png + icons/flags/PAL-IN.png + icons/flags/PAL-M.png + icons/flags/PAL-NL.png + icons/flags/PAL-NO.png + icons/flags/PAL-P.png + icons/flags/PAL-R.png + icons/flags/PAL-S.png + icons/flags/PAL-SC.png + icons/flags/PAL-SW.png + icons/flags/PAL-SWI.png + icons/flags/PAL-UK.png icons/logo.png icons/media-optical-24.png icons/media-optical-gear-24.png