diff options
Diffstat (limited to 'engines/sword25/kernel/resmanager.cpp')
-rw-r--r-- | engines/sword25/kernel/resmanager.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/sword25/kernel/resmanager.cpp b/engines/sword25/kernel/resmanager.cpp index 8b446e69d1..cc3316250a 100644 --- a/engines/sword25/kernel/resmanager.cpp +++ b/engines/sword25/kernel/resmanager.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ /* @@ -147,6 +144,21 @@ void ResourceManager::emptyCache() { } } +void ResourceManager::emptyThumbnailCache() { + // Scan through the resource list + Common::List<Resource *>::iterator iter = _resources.begin(); + while (iter != _resources.end()) { + if ((*iter)->getFileName().hasPrefix("/saves")) { + // Unlock the thumbnail + while ((*iter)->getLockCount() > 0) + (*iter)->release(); + // Delete the thumbnail + iter = deleteResource(*iter); + } else + ++iter; + } +} + /** * Returns a requested resource. If any error occurs, returns NULL * @param FileName Filename of resource |