mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-26 23:24:38 +02:00
Fix a bug where users couldn't exit from dgl. Found by blindcoder.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@449 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
dfc4cc51d1
commit
715108f70d
@ -1717,14 +1717,14 @@ purge_stale_locks (int game)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
int
|
||||||
runmenuloop(struct dg_menu *menu)
|
runmenuloop(struct dg_menu *menu)
|
||||||
{
|
{
|
||||||
struct dg_banner ban;
|
struct dg_banner ban;
|
||||||
struct dg_menuoption *tmpopt;
|
struct dg_menuoption *tmpopt;
|
||||||
int userchoice = 0;
|
int userchoice = 0;
|
||||||
|
|
||||||
if (!menu) return;
|
if (!menu) return 1;
|
||||||
|
|
||||||
ban.lines = NULL;
|
ban.lines = NULL;
|
||||||
ban.len = 0;
|
ban.len = 0;
|
||||||
@ -1736,7 +1736,7 @@ runmenuloop(struct dg_menu *menu)
|
|||||||
mvprintw(menu->cursor_y, menu->cursor_x, "");
|
mvprintw(menu->cursor_y, menu->cursor_x, "");
|
||||||
refresh();
|
refresh();
|
||||||
userchoice = getch();
|
userchoice = getch();
|
||||||
if (userchoice == ERR) return;
|
if (userchoice == ERR) return 1;
|
||||||
tmpopt = menu->options;
|
tmpopt = menu->options;
|
||||||
while (tmpopt) {
|
while (tmpopt) {
|
||||||
if (strchr(tmpopt->keys, userchoice)) {
|
if (strchr(tmpopt->keys, userchoice)) {
|
||||||
@ -1749,7 +1749,7 @@ runmenuloop(struct dg_menu *menu)
|
|||||||
|
|
||||||
if (return_from_submenu) {
|
if (return_from_submenu) {
|
||||||
return_from_submenu = 0;
|
return_from_submenu = 0;
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_retard(0)) {
|
if (check_retard(0)) {
|
||||||
@ -2004,7 +2004,8 @@ main (int argc, char** argv)
|
|||||||
initcurses ();
|
initcurses ();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
runmenuloop(dgl_find_menu(loggedin ? "mainmenu_user" : "mainmenu_anon"));
|
if (runmenuloop(dgl_find_menu(loggedin ? "mainmenu_user" : "mainmenu_anon")))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOW we can safely kill this */
|
/* NOW we can safely kill this */
|
||||||
|
@ -191,7 +191,7 @@ extern struct dg_game **populate_games(int game, int *l);
|
|||||||
|
|
||||||
extern struct dg_game **sort_games(struct dg_game **games, int len, dg_sortmode sortmode);
|
extern struct dg_game **sort_games(struct dg_game **games, int len, dg_sortmode sortmode);
|
||||||
|
|
||||||
void runmenuloop(struct dg_menu *menu);
|
int runmenuloop(struct dg_menu *menu);
|
||||||
|
|
||||||
extern void inprogressmenu(int gameid);
|
extern void inprogressmenu(int gameid);
|
||||||
extern void change_email(void);
|
extern void change_email(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user