From: Pasi Kallinen Date: Mon, 19 Oct 2009 15:17:28 +0000 (+0000) Subject: Don't clear the menu screen if the keypress wasn't recognized. X-Git-Tag: v1.6.1-roc-dev~203 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=91675def980a620a7dd2a59969d8eaae5cd30e3b;p=dgamelaunch Don't clear the menu screen if the keypress wasn't recognized. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@505 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/dgamelaunch.c b/dgamelaunch.c index 75aa9ee..781c467 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1876,6 +1876,7 @@ runmenuloop(struct dg_menu *menu) struct dg_banner ban; struct dg_menuoption *tmpopt; int userchoice = 0; + int doclear = 1; if (!menu) return 1; @@ -1884,7 +1885,10 @@ runmenuloop(struct dg_menu *menu) loadbanner(menu->banner_fn, &ban); while (1) { - clear(); + if (doclear) { + doclear = 0; + clear(); + } drawbanner(&ban, 1, 0); mvprintw(menu->cursor_y, menu->cursor_x, ""); refresh(); @@ -1894,6 +1898,7 @@ runmenuloop(struct dg_menu *menu) while (tmpopt) { if (strchr(tmpopt->keys, userchoice)) { dgl_exec_cmdqueue(tmpopt->cmdqueue, selected_game, me); + doclear = 1; break; } else { tmpopt = tmpopt->next;