Qt: Invalidate FSUI cover cache when cover changed

This commit is contained in:
Stenzek 2025-01-13 12:54:18 +10:00
parent 738c96ffb3
commit 2f854de9d0
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View File

@ -986,10 +986,15 @@ void FullscreenUI::Render()
void FullscreenUI::InvalidateCoverCache()
{
if (!IsInitialized())
if (!GPUThread::IsFullscreenUIRequested())
return;
Host::RunOnCPUThread([]() { s_state.cover_image_map.clear(); });
GPUThread::RunOnThread([]() {
if (!IsInitialized())
return;
s_state.cover_image_map.clear();
});
}
void FullscreenUI::ReturnToPreviousWindow()

View File

@ -8,6 +8,7 @@
#include "qtutils.h"
#include "settingswindow.h"
#include "core/fullscreen_ui.h"
#include "core/game_list.h"
#include "core/host.h"
#include "core/settings.h"
@ -476,6 +477,7 @@ void GameListWidget::gridIntScale(int int_scale)
void GameListWidget::refreshGridCovers()
{
m_model->refreshCovers();
Host::RunOnCPUThread(&FullscreenUI::InvalidateCoverCache);
}
void GameListWidget::focusSearchWidget()