GameTracker.cpp: fix compilation with Clang on Windows

This commit is contained in:
oltolm 2025-04-14 00:18:12 +02:00
parent 0b025b3b4f
commit 38c82771d3
3 changed files with 15 additions and 0 deletions

View file

@ -21,6 +21,9 @@
#include "UICommon/GameFile.h"
#include "UICommon/UICommon.h"
#pragma push_macro("RemoveDirectory")
#undef RemoveDirectory
const QSize GAMECUBE_BANNER_SIZE(96, 32);
GameListModel::GameListModel(QObject* parent) : QAbstractTableModel(parent)
@ -515,3 +518,5 @@ void GameListModel::OnEmulationStateChanged(Core::State state)
m_timer.Reload();
}
}
#pragma pop_macro("RemoveDirectory")

View file

@ -20,6 +20,9 @@
#include "UICommon/GameFile.h"
#pragma push_macro("RemoveDirectory")
#undef RemoveDirectory
// NOTE: Qt likes to be case-sensitive here even though it shouldn't be thus this ugly regex hack
static const QStringList game_filters{
QStringLiteral("*.[gG][cC][mM]"), QStringLiteral("*.[bB][iI][nN]"),
@ -369,3 +372,5 @@ void GameTracker::PurgeCache()
m_needs_purge = true;
Settings::Instance().RefreshGameList();
}
#pragma pop_macro("RemoveDirectory")

View file

@ -17,6 +17,9 @@
#include "Common/WorkQueueThread.h"
#include "UICommon/GameFileCache.h"
#pragma push_macro("RemoveDirectory")
#undef RemoveDirectory
namespace UICommon
{
class GameFile;
@ -100,3 +103,5 @@ private:
Q_DECLARE_METATYPE(std::shared_ptr<const UICommon::GameFile>)
Q_DECLARE_METATYPE(std::string)
#pragma pop_macro("RemoveDirectory")