[9XR-PRO] Navigation problem in Modelsel screen
This commit is contained in:
@@ -628,69 +628,71 @@ void check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CPUARM)
|
uint8_t maxLines = menuTab ? LCD_LINES-1 : LCD_LINES-2;
|
||||||
|
|
||||||
int linesCount = maxrow;
|
int linesCount = maxrow;
|
||||||
|
|
||||||
if (l_posVert == 0 || (l_posVert==1 && MAXCOL(vertpos_t(0)) >= HIDDEN_ROW) || (l_posVert==2 && MAXCOL(vertpos_t(0)) >= HIDDEN_ROW && MAXCOL(vertpos_t(1)) >= HIDDEN_ROW)) {
|
#if defined(CPUARM)
|
||||||
s_pgOfs = 0;
|
if (l_posVert == 0 || (l_posVert==1 && MAXCOL(vertpos_t(0)) >= HIDDEN_ROW) || (l_posVert==2 && MAXCOL(vertpos_t(0)) >= HIDDEN_ROW && MAXCOL(vertpos_t(1)) >= HIDDEN_ROW)) {
|
||||||
if (horTab) {
|
s_pgOfs = 0;
|
||||||
linesCount = 0;
|
if (horTab) {
|
||||||
for (int i=0; i<maxrow; i++) {
|
linesCount = 0;
|
||||||
if (i>=horTabMax || horTab[i] != HIDDEN_ROW) {
|
for (int i=0; i<maxrow; i++) {
|
||||||
linesCount++;
|
if (i>=horTabMax || horTab[i] != HIDDEN_ROW) {
|
||||||
}
|
linesCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (horTab) {
|
}
|
||||||
if (maxrow > NUM_BODY_LINES) {
|
else if (horTab) {
|
||||||
while (1) {
|
if (maxrow > maxLines) {
|
||||||
vertpos_t firstLine = 0;
|
while (1) {
|
||||||
for (int numLines=0; firstLine<maxrow && numLines<s_pgOfs; firstLine++) {
|
vertpos_t firstLine = 0;
|
||||||
if (firstLine>=horTabMax || horTab[firstLine+1] != HIDDEN_ROW) {
|
for (int numLines=0; firstLine<maxrow && numLines<s_pgOfs; firstLine++) {
|
||||||
|
if (firstLine>=horTabMax || horTab[firstLine+1] != HIDDEN_ROW) {
|
||||||
|
numLines++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (l_posVert <= firstLine) {
|
||||||
|
s_pgOfs--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
vertpos_t lastLine = firstLine;
|
||||||
|
for (int numLines=0; lastLine<maxrow && numLines<maxLines; lastLine++) {
|
||||||
|
if (lastLine>=horTabMax || horTab[lastLine+1] != HIDDEN_ROW) {
|
||||||
numLines++;
|
numLines++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l_posVert <= firstLine) {
|
if (l_posVert > lastLine) {
|
||||||
s_pgOfs--;
|
s_pgOfs++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
vertpos_t lastLine = firstLine;
|
linesCount = s_pgOfs + maxLines;
|
||||||
for (int numLines=0; lastLine<maxrow && numLines<NUM_BODY_LINES; lastLine++) {
|
for (int i=lastLine; i<maxrow; i++) {
|
||||||
if (lastLine>=horTabMax || horTab[lastLine+1] != HIDDEN_ROW) {
|
if (i>=horTabMax || horTab[i] != HIDDEN_ROW) {
|
||||||
numLines++;
|
linesCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l_posVert > lastLine) {
|
break;
|
||||||
s_pgOfs++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
linesCount = s_pgOfs + NUM_BODY_LINES;
|
|
||||||
for (int i=lastLine; i<maxrow; i++) {
|
|
||||||
if (i>=horTabMax || horTab[i] != HIDDEN_ROW) {
|
|
||||||
linesCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
if (l_posVert>NUM_BODY_LINES+s_pgOfs) {
|
|
||||||
s_pgOfs = l_posVert-NUM_BODY_LINES;
|
|
||||||
}
|
|
||||||
else if (l_posVert<=s_pgOfs) {
|
|
||||||
s_pgOfs = l_posVert-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
uint8_t max = menuTab ? LCD_LINES-1 : LCD_LINES-2;
|
if (l_posVert<1) {
|
||||||
if (l_posVert<1) s_pgOfs=0;
|
s_pgOfs=0;
|
||||||
else if (l_posVert>max+s_pgOfs) s_pgOfs = l_posVert-max;
|
}
|
||||||
else if (l_posVert<1+s_pgOfs) s_pgOfs = l_posVert-1;
|
|
||||||
#endif
|
#endif
|
||||||
|
else {
|
||||||
|
if (l_posVert>maxLines+s_pgOfs) {
|
||||||
|
s_pgOfs = l_posVert-maxLines;
|
||||||
|
}
|
||||||
|
else if (l_posVert<=s_pgOfs) {
|
||||||
|
s_pgOfs = l_posVert-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_posVert = l_posVert;
|
m_posVert = l_posVert;
|
||||||
m_posHorz = l_posHorz;
|
m_posHorz = l_posHorz;
|
||||||
#if !defined(CPUM64)
|
#if !defined(CPUM64)
|
||||||
|
|||||||
Reference in New Issue
Block a user