Small fixes to the watching-screen, caused by variable height screen.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@474 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Pasi Kallinen 2009-10-18 02:11:31 +00:00
parent 4d3be5720c
commit 0b9067ee0a
1 changed files with 14 additions and 4 deletions

View File

@ -408,6 +408,9 @@ inprogressmenu (int gameid)
{
while (offset >= len && offset >= max_height)
offset -= max_height;
while ((offset > 0) && (offset + max_height > len))
offset--;
}
erase ();
@ -479,15 +482,16 @@ inprogressmenu (int gameid)
}
break;
case '>':
if ((offset + max_height) >= len)
break;
else
if ((offset + max_height) >= len) {
if (max_height < len) offset = (len - max_height);
else offset = 0;
} else
offset += max_height;
break;
case '<':
if ((offset - max_height) < 0)
break;
offset = 0;
else
offset -= max_height;
break;
@ -520,6 +524,12 @@ inprogressmenu (int gameid)
default:
if (strchr(selectorchars, menuchoice)) {
int sidx = strchr(selectorchars, menuchoice) - selectorchars;
if (sidx > max_height) {
selected = -1;
break;
}
if (is_nhext[sidx]) /* Cannot watch NhExt game */
break;