[Scummvm-git-logs] scummvm master -> ac771ac2dee130bd074e6bc808979d4fb853c825
SupSuper
noreply at scummvm.org
Tue Oct 4 00:43:15 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ac771ac2de GUI: Fix engine icons only showing up in grid once
Commit: ac771ac2dee130bd074e6bc808979d4fb853c825
https://github.com/scummvm/scummvm/commit/ac771ac2dee130bd074e6bc808979d4fb853c825
Author: SupSuper (supsuper at gmail.com)
Date: 2022-10-04T01:37:28+01:00
Commit Message:
GUI: Fix engine icons only showing up in grid once
Changed paths:
gui/widgets/grid.cpp
diff --git a/gui/widgets/grid.cpp b/gui/widgets/grid.cpp
index f2c01641a76..8d73e11843e 100644
--- a/gui/widgets/grid.cpp
+++ b/gui/widgets/grid.cpp
@@ -635,6 +635,7 @@ void GridWidget::reloadThumbnails() {
continue;
if (!_loadedSurfaces.contains(entry->thumbPath)) {
+ _loadedSurfaces[entry->thumbPath] = nullptr;
Common::String path = Common::String::format("icons/%s-%s.png", entry->engineid.c_str(), entry->gameid.c_str());
Graphics::ManagedSurface *surf = loadSurfaceFromFile(path);
if (!surf) {
@@ -642,9 +643,9 @@ void GridWidget::reloadThumbnails() {
if (!_loadedSurfaces.contains(path)) {
surf = loadSurfaceFromFile(path);
} else {
- continue;
+ const Graphics::ManagedSurface *scSurf = _loadedSurfaces[path];
+ _loadedSurfaces[entry->thumbPath] = new Graphics::ManagedSurface(*scSurf);
}
-
}
if (surf) {
@@ -659,8 +660,6 @@ void GridWidget::reloadThumbnails() {
surf->free();
delete surf;
}
- } else {
- _loadedSurfaces[entry->thumbPath] = nullptr;
}
}
}
More information about the Scummvm-git-logs
mailing list