GLK: FROTZ: Add support for pair windows to have more than 2 children
This is primarily for the V6 games, which have up to 8 windows on-screen at the same time in arbitray positions ext
This commit is contained in:
parent
3ed48e3de2
commit
f1d9722f3b
8 changed files with 138 additions and 79 deletions
|
@ -258,10 +258,11 @@ winid_t GlkAPI::glk_window_get_sibling(winid_t win) {
|
|||
if (!parentWin)
|
||||
return nullptr;
|
||||
|
||||
if (parentWin->_child1 == win)
|
||||
return parentWin->_child2;
|
||||
else if (parentWin->_child2 == win)
|
||||
return parentWin->_child1;
|
||||
int index = parentWin->_children.indexOf(win);
|
||||
if (index == ((int)parentWin->_children.size() - 1))
|
||||
return parentWin->_children.front();
|
||||
else if (index >= 0)
|
||||
return parentWin->_children[index + 1];
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue