From d787f06c63c3a63e268210725b0537954f1a460f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 13 Sep 2020 19:20:30 +0200 Subject: [PATCH] The cached gamelist background is now updated when using the metadata editor. --- es-app/src/guis/GuiMetaDataEd.cpp | 3 +++ es-core/src/Window.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 1f7920eee..531caefe0 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -386,6 +386,9 @@ void GuiMetaDataEd::save() } mScraperParams.system->onMetaDataSavePoint(); + // Make sure that the cached background is updated to reflect any possible visible + // changes to the gamelist (e.g. the game name). + mWindow->invalidateCachedBackground(); } void GuiMetaDataEd::fetch() diff --git a/es-core/src/Window.h b/es-core/src/Window.h index d7166b7a3..84efedf55 100644 --- a/es-core/src/Window.h +++ b/es-core/src/Window.h @@ -4,9 +4,8 @@ // Window management, screensaver and help prompts. // -#pragma once #ifndef ES_CORE_WINDOW_H -#define ES_CORE_WInDOW_H +#define ES_CORE_WINDOW_H #include "resources/TextureResource.h" #include "HelpPrompt.h" @@ -92,6 +91,8 @@ public: void unsetLaunchedGame(); bool getGameLaunchedState() { return mGameLaunchedState; }; + void invalidateCachedBackground() { mCachedBackground = false; }; + private: void onSleep(); void onWake();