Minor GameInfo memory handling improvements. Still not great.

This commit is contained in:
Henrik Rydgård committed 2017-05-18 12:41:42 +02:00
1 parent 0f4e064053
commit 60378a0dcb
7 files changed
+39 -42

No files matched your search

+1
View File
@@ -156,6 +156,7 @@ bool ManagedTexture::LoadFromFile(const std::string &filename, ImageFileType typ
ManagedTexture *CreateTextureFromFile(Draw::DrawContext *draw, const char *filename, ImageFileType type, bool generateMips) {
if (!draw)
return nullptr;
// TODO: Load the texture on a background thread.
ManagedTexture *mtex = new ManagedTexture(draw);
if (!mtex->LoadFromFile(filename, type, generateMips)) {
delete mtex;