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:
parent
9f88dbd656
commit
2bee5b64e4
6 changed files with 51 additions and 13 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue