mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 11:18:36 +12:00
game list: Silence some warning
This commit is contained in:
parent
23fdcbfeb8
commit
795e234c6f
1 changed files with 19 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include "Loader/PSF.h"
|
#include "Loader/PSF.h"
|
||||||
#include "util/types.hpp"
|
#include "util/types.hpp"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
|
#include "Utilities/mutex.h"
|
||||||
#include "util/yaml.hpp"
|
#include "util/yaml.hpp"
|
||||||
#include "Input/pad_thread.h"
|
#include "Input/pad_thread.h"
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
#include <QtConcurrent>
|
#include <QtConcurrent>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
@ -2187,10 +2189,26 @@ void game_list_frame::RepaintIcons(const bool& from_settings)
|
||||||
|
|
||||||
const std::function func = [this](const game_info& game) -> movie_item*
|
const std::function func = [this](const game_info& game) -> movie_item*
|
||||||
{
|
{
|
||||||
|
static std::unordered_set<std::string> warn_once_list;
|
||||||
|
static shared_mutex s_mtx;
|
||||||
|
|
||||||
if (game->icon.isNull() && (game->info.icon_path.empty() || !game->icon.load(qstr(game->info.icon_path))))
|
if (game->icon.isNull() && (game->info.icon_path.empty() || !game->icon.load(qstr(game->info.icon_path))))
|
||||||
{
|
{
|
||||||
game_list_log.warning("Could not load image from path %s", sstr(QDir(qstr(game->info.icon_path)).absolutePath()));
|
if (game_list_log.warning)
|
||||||
|
{
|
||||||
|
bool logged = false;
|
||||||
|
{
|
||||||
|
std::lock_guard lock(s_mtx);
|
||||||
|
logged = !warn_once_list.emplace(game->info.icon_path).second;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!logged)
|
||||||
|
{
|
||||||
|
game_list_log.warning("Could not load image from path %s", sstr(QDir(qstr(game->info.icon_path)).absolutePath()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QColor color = getGridCompatibilityColor(game->compat.color);
|
const QColor color = getGridCompatibilityColor(game->compat.color);
|
||||||
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
||||||
return game->item;
|
return game->item;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue