Skip to content

Commit

Permalink
GUI: Cache bitmaps again
Browse files Browse the repository at this point in the history
This reverts commit 04f040a which claims to fix a theme reload bug but
I wasn't able to reproduce this behavior at all (with changed scale
and/or renderer ThemeEngine is reset and its _bitmap cache doesn't
contain any leftovers).
  • Loading branch information
mikrosk committed Mar 12, 2023
1 parent b3e8220 commit 6f87f19
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gui/ThemeEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,7 @@ bool ThemeEngine::addBitmap(const Common::String &filename, const Common::String
// Nothing has to be done if the bitmap already has been loaded.
Graphics::ManagedSurface *surf = _bitmaps[filename];
if (surf) {
surf->free();
delete surf;
surf = nullptr;

_bitmaps.erase(filename);
return true;
}

if (!scalablefile.empty()) {
Expand Down

0 comments on commit 6f87f19

Please sign in to comment.