aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-03-02 23:36:13 +0100
committerWillem Jan Palenstijn2011-03-02 23:48:57 +0100
commit3f052213346e7887c85b6a2a5d31b24015d672bc (patch)
tree74400b5c58550c9a2f878113adb8a9bf3839dc17
parent1ef1f3e67183b8b2f19bc9ba22b04d774381f9f9 (diff)
downloadscummvm-rg350-3f052213346e7887c85b6a2a5d31b24015d672bc.tar.gz
scummvm-rg350-3f052213346e7887c85b6a2a5d31b24015d672bc.tar.bz2
scummvm-rg350-3f052213346e7887c85b6a2a5d31b24015d672bc.zip
SCI: Always add new windows to back of list up to SCI_1_EGA_ONLY.
Confirmed this behaviour in KQ1sci, KQ4, Iceman and QfG2. Hoyle3-demo remains an exception.
-rw-r--r--engines/sci/graphics/ports.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index d971b77f98..c89f46b300 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -308,10 +308,11 @@ Window *GfxPorts::addWindow(const Common::Rect &dims, const Common::Rect *restor
_windowsById[id] = pwnd;
-
- // Hoyle3-demo's NewWindow always adds windows to the back of the list.
- // TODO: Determine if other interpreters do the same.
- bool forceToBack = (g_sci->getGameId() == GID_HOYLE3 && g_sci->isDemo());
+ // KQ1sci, KQ4, iceman, QfG2 always add windows to the back of the list.
+ // KQ5CD checks style.
+ // Hoyle3-demo also always adds to the back (#3036763).
+ bool forceToBack = (getSciVersion() <= SCI_VERSION_1_EGA_ONLY) ||
+ (g_sci->getGameId() == GID_HOYLE3 && g_sci->isDemo());
if (!forceToBack && (style & SCI_WINDOWMGR_STYLE_TOPMOST))
_windowList.push_front(pwnd);