diff --git a/src/ui/screen/screen_io.cpp b/src/ui/screen/screen_io.cpp index 46d90336..2f818b3e 100644 --- a/src/ui/screen/screen_io.cpp +++ b/src/ui/screen/screen_io.cpp @@ -143,6 +143,19 @@ void CScreenIO::IOUpdateList(bool isWrite) sel = pl->GetSelect(); max = pl->GetTotal(); + // enable/disable buttons if we have selected a game + pb = static_cast(pw->SearchControl(EVENT_INTERFACE_IODELETE)); + if ( pb != nullptr ) + { + pb->SetState(STATE_ENABLE, (!isWrite && sel < max) || (isWrite && sel < max - 1)); + } + + pb = static_cast(pw->SearchControl(EVENT_INTERFACE_IOREAD)); + if ( pb != nullptr ) + { + pb->SetState(STATE_ENABLE, sel < max); + } + if (m_saveList.size() <= static_cast(sel)) return; @@ -157,12 +170,6 @@ void CScreenIO::IOUpdateList(bool isWrite) { pi->SetFilenameImage(""); } - - pb = static_cast(pw->SearchControl(EVENT_INTERFACE_IODELETE)); - if ( pb != nullptr ) - { - pb->SetState(STATE_ENABLE, sel < max-1); - } } else {