Add new icon cache, for caching small images.

It doesn't try to insert or fetch missing things itself, re-fetching is up to the caller.

This will be required for handling the many achievement icons.

Saving/loading the cache to a single file on disk is implemented but not
hooked up yet. It works without it, though of course will have to
re-fetch things on the next startup.
This commit is contained in:
Henrik Rydgård committed 2023-06-18 14:11:12 +02:00
1 parent 9f88dbd656
commit 2bee5b64e4
6 files changed
+51 -13

No files matched your search

+2
View File
@@ -6,6 +6,7 @@
#include "Common/UI/UI.h"
#include "Common/UI/View.h"
#include "Common/UI/ViewGroup.h"
#include "Common/UI/IconCache.h"
#include "Common/Log.h"
#include "Common/TimeUtil.h"
@@ -130,6 +131,7 @@ void ScreenManager::axis(const AxisInput &axis) {
void ScreenManager::deviceLost() {
for (auto &iter : stack_)
iter.screen->deviceLost();
g_iconCache.ClearTextures();
}
void ScreenManager::deviceRestored() {