diff options
author | Bendegúz Nagy | 2016-08-22 19:27:10 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 2199f879bdcd27806e304782423e2b3e838d6bbc (patch) | |
tree | 26baf467d2261921eb2e74a8934485af59f6e1d4 /engines/dm/eventman.cpp | |
parent | 22a79ac9652a42b0ff08791ebd69b047db170cb5 (diff) | |
download | scummvm-rg350-2199f879bdcd27806e304782423e2b3e838d6bbc.tar.gz scummvm-rg350-2199f879bdcd27806e304782423e2b3e838d6bbc.tar.bz2 scummvm-rg350-2199f879bdcd27806e304782423e2b3e838d6bbc.zip |
DM: Fix incorrect thumbnails
Diffstat (limited to 'engines/dm/eventman.cpp')
-rw-r--r-- | engines/dm/eventman.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index a3677b082c..8ad7971fe2 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -40,6 +40,7 @@ #include "group.h" #include "dialog.h" #include "sounds.h" +#include <mortevielle/saveload.h> namespace DM { @@ -769,6 +770,14 @@ void EventManager::f380_processCommandQueue() { } if ((cmdType >= k7_CommandToggleInventoryChampion_0) && (cmdType <= k11_CommandCloseInventory)) { + if (cmdType == k11_CommandCloseInventory) { + delete _vm->_saveThumbnail; + _vm->_saveThumbnail = nullptr; + } else if (!_vm->_saveThumbnail) { + _vm->_saveThumbnail = new Common::MemoryWriteStreamDynamic(); + Graphics::saveThumbnail(*_vm->_saveThumbnail); + } + int16 championIndex = cmdType - k7_CommandToggleInventoryChampion_0; if (((championIndex == k4_ChampionCloseInventory) || (championIndex < _vm->_championMan->_g305_partyChampionCount)) && !_vm->_championMan->_g299_candidateChampionOrdinal) _vm->_inventoryMan->f355_toggleInventory((ChampionIndex)championIndex); |