Fix bug where Save SRAM button could be focused when disabled (#1026)

This commit is contained in:
InfiniteBlueGX 2022-10-09 13:34:55 -05:00 committed by GitHub
parent 4327670959
commit aa9d1f679e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,7 +269,10 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
}
else
{
selectedItem -= 1;
if(saveBtn[selectedItem-1]->IsVisible())
{
selectedItem -= 1;
}
}
}
else if(t->Down() || arrowDownBtn->GetState() == STATE_CLICKED)
@ -307,7 +310,10 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
}
else
{
selectedItem -= 2;
if(saveBtn[selectedItem-2]->IsVisible())
{
selectedItem -= 2;
}
}
}