]> skyeroc.xyz Git - dgamelaunch/commitdiff
Actually mark the game entry as selected when using '/' or '*' in watching menu.
authorPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2009 13:20:55 +0000 (13:20 +0000)
committerPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2009 13:20:55 +0000 (13:20 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@490 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index cbfe52f5cf635abd2b993860fa52b04d7e6961d2..83a0869951dbb76641e8bbadefdcc9da0c85d443 100644 (file)
@@ -476,7 +476,7 @@ inprogressmenu (int gameid)
          if (max_height+offset < len)
              mvprintw ((btm+top_banner_hei), 1, "(%d-%d of %d)", offset + 1, offset + i, len);
          else
-             mvprintw ((btm+top_banner_hei), 1, "(end)");
+             mvprintw ((btm+top_banner_hei), 4, "(end)");
          mvaddstr ((btm+2+top_banner_hei), 1, "Watch which game? ('?' for help) => ");
       } else {
          mvprintw(top_banner_hei,4,"Sorry, no games available for viewing.");
@@ -490,6 +490,7 @@ inprogressmenu (int gameid)
        case '*':
            if (len > 0) {
                idx = random() % len;
+               selected = idx;
                goto watchgame;
            }
            break;
@@ -510,6 +511,7 @@ inprogressmenu (int gameid)
                    if (match > -1) {
                       if (!strcmp(games[match]->ttyrec_fn + strlen (games[match]->ttyrec_fn) - 6, ".nhext")) break;
                       idx = match;
+                      selected = idx;
                       goto watchgame;
                    }
                }