mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
make Menu_SelectMenu(NIL) do the right thing and handle qc code that clears
the current menu but forgets to return 1 in keyevent
This commit is contained in:
parent
7775dab7bb
commit
ec0b3d8940
1 changed files with 6 additions and 3 deletions
|
@ -244,11 +244,14 @@ bi_Menu_SelectMenu (progs_t *pr)
|
|||
{
|
||||
const char *name = G_STRING (pr, OFS_PARM0);
|
||||
|
||||
menu = 0;
|
||||
if (name && *name)
|
||||
menu = Hash_Find (menu_hash, name);
|
||||
if (menu) {
|
||||
key_dest = key_menu;
|
||||
game_target = IMT_CONSOLE;
|
||||
} else {
|
||||
if (name && *name)
|
||||
Con_Printf ("no menu \"%s\"\n", name);
|
||||
if (con_data.force_commandline) {
|
||||
key_dest = key_console;
|
||||
|
@ -426,7 +429,7 @@ Menu_KeyEvent (knum_t key, short unicode, qboolean down)
|
|||
if (G_INT (&menu_pr_state, OFS_RETURN))
|
||||
return;
|
||||
}
|
||||
if (!menu->items)
|
||||
if (!menu || !menu->items)
|
||||
return;
|
||||
switch (key) {
|
||||
case QFK_DOWN:
|
||||
|
|
Loading…
Reference in a new issue