Qt: fix game grid regression

This commit is contained in:
Megamouse 2020-02-06 19:32:37 +01:00
parent 382bdcdcb7
commit edcd2fc14a
3 changed files with 5 additions and 15 deletions

View File

@ -5,6 +5,7 @@
#include "table_item_delegate.h"
#include "custom_table_widget_item.h"
#include "input_dialog.h"
#include "localized.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
@ -293,7 +294,9 @@ bool game_list_frame::IsEntryVisible(const game_info& game)
{
return m_categoryFilters.contains(qstr(game->info.category));
}
return category::CategoryInMap(game->info.category, Localized().category.cat_boot);
const auto cat_boot = Localized().category.cat_boot;
return cat_boot.find(qstr(game->info.category)) != cat_boot.end();
};
const QString serial = qstr(game->info.serial);

View File

@ -10,7 +10,6 @@
#include "persistent_settings.h"
#include "game_compatibility.h"
#include "category.h"
#include "localized.h"
#include <QMainWindow>
#include <QToolBar>
@ -20,19 +19,6 @@
#include <memory>
namespace category
{
inline bool CategoryInMap(const std::string& cat, const localized_cat& map)
{
auto map_contains_category = [s = qstr(cat)](const auto& p)
{
return p.second == s;
};
return std::find_if(map.begin(), map.end(), map_contains_category) != map.end();
}
}
/* Having the icons associated with the game info simplifies logic internally */
struct gui_game_info
{

View File

@ -2,6 +2,7 @@
#include "game_list_frame.h"
#include "qt_utils.h"
#include "localized.h"
#include <QCoreApplication>
#include <QMessageBox>