diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index d6e572dec9..5f4a3154d5 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -1286,6 +1286,7 @@ .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" + $(QTDIR)\bin\moc.exe;%(FullPath) diff --git a/rpcs3/rpcs3.vcxproj.filters b/rpcs3/rpcs3.vcxproj.filters index ab4e7c5f49..0461e80cb9 100644 --- a/rpcs3/rpcs3.vcxproj.filters +++ b/rpcs3/rpcs3.vcxproj.filters @@ -661,6 +661,9 @@ Io\evdev + + Gui\game list + diff --git a/rpcs3/rpcs3qt/custom_table_widget_item.h b/rpcs3/rpcs3qt/custom_table_widget_item.h new file mode 100644 index 0000000000..c4639a9620 --- /dev/null +++ b/rpcs3/rpcs3qt/custom_table_widget_item.h @@ -0,0 +1,12 @@ +#pragma once + +#include + +class custom_table_widget_item : public QTableWidgetItem +{ +public: + bool operator <(const QTableWidgetItem &other) const + { + return data(Qt::UserRole) < other.data(Qt::UserRole); + } +}; diff --git a/rpcs3/rpcs3qt/game_compatibility.h b/rpcs3/rpcs3qt/game_compatibility.h index 12f9dea357..91d66f327f 100644 --- a/rpcs3/rpcs3qt/game_compatibility.h +++ b/rpcs3/rpcs3qt/game_compatibility.h @@ -21,14 +21,14 @@ class game_compatibility : public QObject const std::map Status_Data = { - { "Playable", { "", "#2ecc71", QObject::tr("Playable"), QObject::tr("Games that can be properly played from start to finish") } }, - { "Ingame", { "", "#f1c40f", QObject::tr("Ingame"), QObject::tr("Games that go somewhere but not far enough to be considered playable") } }, - { "Intro", { "", "#f39c12", QObject::tr("Intro"), QObject::tr("Games that only display some screens") } }, - { "Loadable", { "", "#e74c3c", QObject::tr("Loadable"), QObject::tr("Games that display a black screen with an active framerate") } }, - { "Nothing", { "", "#2c3e50", QObject::tr("Nothing"), QObject::tr("Games that show nothing") } }, - { "NoResult", { "", "", QObject::tr("No results found"), QObject::tr("There is no entry for this game or application in the compatibility database yet.") } }, - { "NoData", { "", "", QObject::tr("Database missing"), QObject::tr("Right click here and download the current database.\nMake sure you are connected to the internet.") } }, - { "Download", { "", "", QObject::tr("Retrieving..."), QObject::tr("Downloading the compatibility database. Please wait...") } } + { "Playable", { 0, "", "#2ecc71", QObject::tr("Playable"), QObject::tr("Games that can be properly played from start to finish") } }, + { "Ingame", { 1, "", "#f1c40f", QObject::tr("Ingame"), QObject::tr("Games that either can't be finished, have serious glitches or have insufficient performance") } }, + { "Intro", { 2, "", "#f39c12", QObject::tr("Intro"), QObject::tr("Games that display image but don't make it past the menus") } }, + { "Loadable", { 3, "", "#e74c3c", QObject::tr("Loadable"), QObject::tr("Games that display a black screen with a framerate on the window's title") } }, + { "Nothing", { 4, "", "#2c3e50", QObject::tr("Nothing"), QObject::tr("Games that don't initialize properly, not loading at all and/or crashing the emulator") } }, + { "NoResult", { 5, "", "", QObject::tr("No results found"), QObject::tr("There is no entry for this game or application in the compatibility database yet.") } }, + { "NoData", { 6, "", "", QObject::tr("Database missing"), QObject::tr("Right click here and download the current database.\nMake sure you are connected to the internet.") } }, + { "Download", { 7, "", "", QObject::tr("Retrieving..."), QObject::tr("Downloading the compatibility database. Please wait...") } } }; int m_timer_count = 0; QString m_filepath; diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index a8b440ecd5..c91476fda4 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -2,6 +2,7 @@ #include "settings_dialog.h" #include "table_item_delegate.h" +#include "custom_table_widget_item.h" #include "Emu/Memory/Memory.h" #include "Emu/System.h" @@ -1093,9 +1094,10 @@ int game_list_frame::PopulateGameList() } // Compatibility - QTableWidgetItem* compat_item = new QTableWidgetItem; + custom_table_widget_item* compat_item = new custom_table_widget_item; compat_item->setFlags(compat_item->flags() & ~Qt::ItemIsEditable); compat_item->setText(game.compat.text + (game.compat.date.isEmpty() ? "" : " (" + game.compat.date + ")")); + compat_item->setData(Qt::UserRole, game.compat.index); compat_item->setToolTip(game.compat.tooltip); if (!game.compat.color.isEmpty()) { diff --git a/rpcs3/rpcs3qt/gui_settings.h b/rpcs3/rpcs3qt/gui_settings.h index 364a3b0e6b..7367a47dfb 100644 --- a/rpcs3/rpcs3qt/gui_settings.h +++ b/rpcs3/rpcs3qt/gui_settings.h @@ -12,6 +12,7 @@ struct Compat_Status { + int index; QString date; QString color; QString text;