scummvm/graphics
Adrian Frühwirth 00e59a3122 ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:

1. Graphics::loadThumbnail()

   Now returns a boolean and takes a new argument skipThumbnail which
   defaults to false. In case of true, loadThumbnail() reads past the
   thumbnail data in the input stream instead of actually loading the
   thumbnail. This simplifies savegame handling where, up until now,
   many engines always read the whole savegame metadata (including
   the thumbnail) and then threw away the thumbnail when not needed
   (which is in almost all cases, the most common exception being
   MetaEngine::querySaveMetaInfos() which is responsible for loading
   savegame metadata for displaying it in the GUI launcher.

2. readSavegameHeader()

   Engines which already implement such a method (name varies) now take
   a new argument skipThumbnail (default: true) which is passed
   through to loadThumbnail(). This means that the default case for
   readSavegameHeader() is now _not_ loading the thumbnail from a
   savegame and just reading past it. In those cases, e.g.
   querySaveMetaInfos(), where we actually are interested in loading
   the thumbnail readSavegameHeader() needs to explicitely be called
   with skipThumbnail == false.

   Engines whose readSavegameHeader() (name varies) already takes an
   argument loadThumbnail have been adapted to have a similar
   prototype and semantics.
   I.e. readSaveHeader(in, loadThumbnail, header) now is
   readSaveHeader(in, header, skipThumbnail).

3. Error handling

   Engines which previously did not check the return value of
   readSavegameHeader() (name varies) now do so ensuring that possibly
   broken savegames (be it a broken thumbnail or something else) don't
   make it into the GUI launcher list in the first place.
2018-04-07 09:26:20 +02:00
..
fonts GRAPHICS: Fix potentially uninitialized pointers in BDF loader 2017-11-14 09:12:15 +01:00
macgui GRAPHICS: MACGUI: Do not crash when nothing was drawn yet 2017-08-28 19:17:45 +02:00
scaler ALL: Remove obsolete register keyword 2017-12-03 20:27:42 -06:00
colormasks.h
conversion.cpp
conversion.h
cursor.h
cursorman.cpp GRAPHICS: Send blank cursors to graphics backends 2017-10-15 13:24:20 -05:00
cursorman.h
font.cpp GRAPHICS: Added optional initial line width ot text wrapper 2017-01-29 18:41:07 +01:00
font.h GRAPHICS: Added optional initial line width ot text wrapper 2017-01-29 18:41:07 +01:00
fontman.cpp Revert "COMMON: Change way the Singleton instances are instantiated" 2017-07-10 21:17:41 +02:00
fontman.h
maccursor.cpp
maccursor.h
managed_surface.cpp GRAPHICS: Fix ManagedSurface clear calls when no surface is set 2017-12-03 13:10:41 -05:00
managed_surface.h
mode.h BACKENDS: Fix window sizing of games that switch between multiple resolutions 2017-10-07 12:30:29 -05:00
module.mk GRAPHICS: Skeleton of MacTextWindow 2017-07-17 23:45:22 +02:00
nine_patch.cpp
nine_patch.h
palette.h BACKENDS: Refactor OpenGL & SDL graphics backends 2017-10-15 13:24:20 -05:00
pixelformat.cpp GRAPHICS: Include bytesPerPixel in toString representation 2017-05-27 09:39:08 +02:00
pixelformat.h ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
primitives.cpp
primitives.h
scaler.cpp
scaler.h
screen.cpp
screen.h
sjis.cpp
sjis.h
surface.cpp
surface.h COMMON: Add limited support for custom deleters to ScopedPtr 2017-11-18 22:35:12 +01:00
thumbnail.cpp ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
thumbnail.h ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
transform_struct.cpp
transform_struct.h Graphics:: Add multiply blend mode 2017-08-12 08:31:56 +02:00
transform_tools.cpp
transform_tools.h
transparent_surface.cpp Graphics:: Add multiply blend mode 2017-08-12 08:31:56 +02:00
transparent_surface.h GRAPHICS: Allow nearest neighbor scaling of 1Bpp and 2Bpp TransparentSurfaces 2017-07-06 19:12:36 -05:00
VectorRenderer.cpp
VectorRenderer.h GUI: Remove the ThemeItem draw queues 2018-03-12 11:46:04 +01:00
VectorRendererSpec.cpp JANITORIAL: Fix formatting 2018-03-23 20:40:30 +01:00
VectorRendererSpec.h
wincursor.cpp
wincursor.h
yuv_to_rgb.cpp ALL: Remove obsolete register keyword 2017-12-03 20:27:42 -06:00
yuv_to_rgb.h