Don't use ManagedTexture in GameInfoCache, not needed.

This commit is contained in:
Henrik Rydgård committed 2023-12-12 22:34:31 +01:00
1 parent 82bdc9ec50
commit 75e96df448
6 files changed
+14 -10

No files matched your search

+6 -2
View File
@@ -64,18 +64,22 @@ enum class IdentifiedFileType;
struct GameInfoTex {
std::string data;
std::unique_ptr<ManagedTexture> texture;
Draw::Texture *texture = nullptr;
// The time at which the Icon and the BG were loaded.
// Can be useful to fade them in smoothly once they appear.
double timeLoaded = 0.0;
std::atomic<bool> dataLoaded{};
// Can ONLY be called from the main thread!
void Clear() {
if (!data.empty()) {
data.clear();
dataLoaded = false;
}
texture.reset(nullptr);
if (texture) {
texture->Release();
texture = nullptr;
}
}
};