psisetup: avoid cursor on last item

Origin commit data
------------------
Commit: 25c79afcc3
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-07-27 (Mon, 27 Jul 2020)

Origin message was:
------------------
- psisetup: avoid cursor on last item
This commit is contained in:
vanhofen
2020-07-27 23:42:13 +02:00
parent 52680cf1e5
commit 1968230641

View File

@@ -154,7 +154,7 @@ int CPSISetup::exec (CMenuTarget * parent, const std::string &)
psi_list[i].y = y + locHeight * i + i * 2;
psi_list[i].xBox = psi_list[i].x + SLIDERWIDTH + LOCGAP;
psi_list[i].yBox = psi_list[i].y;
psi_list[i].xLoc = psi_list[i].x + SLIDERWIDTH + LOCGAP + 2;
psi_list[i].xLoc = psi_list[i].x + SLIDERWIDTH + LOCGAP + OFFSET_INNER_SMALL;
psi_list[i].yLoc = psi_list[i].y + locHeight - 1;
}
@@ -193,7 +193,7 @@ int CPSISetup::exec (CMenuTarget * parent, const std::string &)
direction = -1;
/* fall through */
case CRCInput::RC_down:
if (selected + direction > -1 && selected + direction < PSI_SCALE_COUNT)
if (selected + direction > -1 && selected + direction < (PSI_SCALE_COUNT - 1))
{
psi_list[selected].selected = false;
paintSlider (selected);