From a9a0601c84bcddbef577a458ced27e652b4df44c Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Mon, 17 Feb 2020 16:37:13 -0800
Subject: [PATCH] Revert "Revert "Let the console open in menus""

This reverts commit 705cf9fd4078ce34857d98043023612e9205773c.
---
 src/console.c | 11 +----------
 src/d_main.c  | 15 +++++++--------
 2 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/src/console.c b/src/console.c
index 59d2b3e6c7..8746bf0366 100644
--- a/src/console.c
+++ b/src/console.c
@@ -613,15 +613,6 @@ void CON_Ticker(void)
 	con_tick++;
 	con_tick &= 7;
 
-	// if the menu is open then close the console.
-	if (menuactive && con_destlines)
-	{
-		consoletoggle = false;
-		con_destlines = 0;
-		CON_ClearHUD();
-		I_UpdateMouseGrab();
-	}
-
 	// console key was pushed
 	if (consoletoggle)
 	{
@@ -793,7 +784,7 @@ boolean CON_Responder(event_t *ev)
 		// check other keys only if console prompt is active
 		if (!consoleready && key < NUMINPUTS) // metzgermeister: boundary check!!
 		{
-			if (bindtable[key])
+			if (! menuactive && bindtable[key])
 			{
 				COM_BufAddText(bindtable[key]);
 				COM_BufAddText("\n");
diff --git a/src/d_main.c b/src/d_main.c
index 2ff0042fd6..149fb30714 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -188,14 +188,14 @@ void D_ProcessEvents(void)
 				continue;
 		}
 
-		// Menu input
-		if (M_Responder(ev))
-			continue; // menu ate the event
-
 		// console input
 		if (CON_Responder(ev))
 			continue; // ate the event
 
+		// Menu input
+		if (M_Responder(ev))
+			continue; // menu ate the event
+
 		G_Responder(ev);
 	}
 }
@@ -502,13 +502,12 @@ static void D_Display(void)
 	// vid size change is now finished if it was on...
 	vid.recalc = 0;
 
-	// FIXME: draw either console or menu, not the two
-	if (gamestate != GS_TIMEATTACK)
-		CON_Drawer();
-
 	M_Drawer(); // menu is drawn even on top of everything
 	// focus lost moved to M_Drawer
 
+	if (gamestate != GS_TIMEATTACK)
+		CON_Drawer();
+
 	//
 	// wipe update
 	//
-- 
GitLab