Menus: Fix current selection of episode menu when you return from the skill menu.

git-svn-id: https://svn.eduke32.com/eduke32@6583 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-01-26 04:34:33 +00:00
parent 9949a3cf5c
commit 29543fd087

View file

@ -3694,6 +3694,17 @@ static void Menu_MaybeSetSelectionToChild(Menu_t * m, MenuID_t id)
{
MenuMenu_t * menu = (MenuMenu_t *)m->object;
if (menu->currentEntry < menu->numEntries)
{
MenuEntry_t const * currentEntry = menu->entrylist[menu->currentEntry];
if (currentEntry != NULL && currentEntry->type == Link)
{
MenuLink_t const * link = (MenuLink_t const *)currentEntry->entry;
if (link->linkID == id)
return; // already good to go
}
}
for (size_t i = 0, i_end = menu->numEntries; i < i_end; ++i)
{
MenuEntry_t const * entry = menu->entrylist[i];