summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/resourcemanager.cpp7
-rw-r--r--src/resources/resourcemanager.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index c8230550a..83beb8e9c 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -1151,3 +1151,10 @@ void ResourceManager::deleteFilesInDirectory(std::string path)
if (dir)
closedir(dir);
}
+
+void ResourceManager::clearCache()
+{
+ cleanProtected();
+ while (cleanOrphans(true))
+ continue;
+}
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index d45a4ba11..d56406bec 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -322,6 +322,8 @@ class ResourceManager final
Resource *getTempResource(const std::string &idPath) A_WARN_UNUSED;
+ void clearCache();
+
static void addDelayedAnimation(AnimationDelayLoad *const animation)
{ mDelayedAnimations.push_back(animation); }