diff --git a/dgamelaunch.c b/dgamelaunch.c index b32a270..cbfe52f 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -487,6 +487,12 @@ inprogressmenu (int gameid) switch ((menuchoice = getch ())) { + case '*': + if (len > 0) { + idx = random() % len; + goto watchgame; + } + break; case '?': (void) runmenuloop(dgl_find_menu("watchmenu_help")); break; @@ -2035,6 +2041,8 @@ main (int argc, char** argv) } setproctitle(""); + srand(time(0)); + create_config(); /* signal handlers */ diff --git a/examples/dgl_menu_watchmenu_help.txt b/examples/dgl_menu_watchmenu_help.txt index 339c0ee..0719e82 100644 --- a/examples/dgl_menu_watchmenu_help.txt +++ b/examples/dgl_menu_watchmenu_help.txt @@ -2,12 +2,13 @@ Help for watching-menu ---------------------- - ? shows this help. + ? show this help. > < next/previous page. - . changes sorting method. + . change sorting method. q Q return to main menu. - a-zA-Z selects the game entry. - enter starts showing the selected game. + a-zA-Z select a game entry. + enter start showing the selected game. + * start showing a randomly selected game. While watching a game @@ -18,4 +19,4 @@ - Press 'q' or space to return to the watching menu. \ No newline at end of file + Press 'q' or space to return to the watching menu.