mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed: DOptionMenu::FirstSelectable should not be called when the menu already has a valid selection.
SVN r2863 (trunk)
This commit is contained in:
parent
e2c105b447
commit
64784b2dc8
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ void DOptionMenu::Init(DMenu *parent, FOptionMenuDescriptor *desc)
|
||||||
mParentMenu = parent;
|
mParentMenu = parent;
|
||||||
GC::WriteBarrier(this, parent);
|
GC::WriteBarrier(this, parent);
|
||||||
mDesc = desc;
|
mDesc = desc;
|
||||||
if (mDesc != NULL) mDesc->mSelectedItem = FirstSelectable();
|
if (mDesc != NULL && mDesc->mSelectedItem == -1) mDesc->mSelectedItem = FirstSelectable();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ void DOptionMenu::Init(DMenu *parent, FOptionMenuDescriptor *desc)
|
||||||
|
|
||||||
int DOptionMenu::FirstSelectable()
|
int DOptionMenu::FirstSelectable()
|
||||||
{
|
{
|
||||||
if (mDesc != NULL && mDesc->mSelectedItem < 0)
|
if (mDesc != NULL)
|
||||||
{
|
{
|
||||||
// Go down to the first selectable item
|
// Go down to the first selectable item
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
Loading…
Reference in a new issue