From 130365ef0d36372349f566104faaa1acc105940d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 1 Nov 2010 20:08:42 +0000 Subject: SCI: fixing port restoring - recalculate _freeCounter - dont push disposed windows onto windowlist svn-id: r54017 --- engines/sci/engine/savegame.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 16c5317952..d0dcbd2993 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -646,10 +646,14 @@ void GfxPorts::saveLoadWithSerializer(Common::Serializer &s) { // of the window can only get repainted by the scripts and they dont do that // so we will get empty, transparent windows instead. So perfect window order // shouldn't really matter - if (window->wndStyle & SCI_WINDOWMGR_STYLE_TOPMOST) - _windowList.push_front(window); - else - _windowList.push_back(window); + if (window->counterTillFree) { + _freeCounter++; + } else { + if (window->wndStyle & SCI_WINDOWMGR_STYLE_TOPMOST) + _windowList.push_front(window); + else + _windowList.push_back(window); + } windowCount--; } -- cgit v1.2.3