From 2d0912b59b6a5d02f5bfb131e0c288382ca83432 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 4 Aug 2019 14:39:31 -0700 Subject: GLK: FROTZ: Fix crash in Arthur intro --- engines/glk/window_pair.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/engines/glk/window_pair.cpp b/engines/glk/window_pair.cpp index e564e54b76..96d879a7c2 100644 --- a/engines/glk/window_pair.cpp +++ b/engines/glk/window_pair.cpp @@ -52,6 +52,12 @@ void PairWindow::rearrange(const Rect &box) { _bbox = box; + if (_dir == winmethod_Arbitrary) { + // When a pair window is in "arbitrary" mode, each child window has it's own independant positioning, + // so thre's no need to be readjusting it + return; + } + if (!_backward) { ch1 = _children[0]; ch2 = _children[1]; @@ -60,19 +66,6 @@ void PairWindow::rearrange(const Rect &box) { ch2 = _children[0]; } - if (_dir == winmethod_Arbitrary) { - // When a pair window is in "arbitrary" mode, each child window has it's own independant positioning, - // so thre's no need to be readjusting it - /* - for (int ctr = 0, idx = (_backward ? (int)_children.size() - 1 : 0); ctr < (int)_children.size(); - ++ctr, idx += (_backward ? -1 : 1)) { - Window *w = _children[idx]; - w->rearrange(); - } - */ - return; - } - if (_vertical) { min = _bbox.left; max = _bbox.right; -- cgit v1.2.3