]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
REALLY fix the ESC menu toggle
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Jan 2010 06:10:18 +0000 (06:10 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Jan 2010 06:10:18 +0000 (06:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9873 d7cf8633-e32d-0410-b094-e92efae38249

menu.c

diff --git a/menu.c b/menu.c
index 8067e63f5f7f4d9f62c0b2a219870f7039d444db..6033cb8bc95ae848042cbd210704888454efff2b 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -279,14 +279,14 @@ void M_ToggleMenu(int mode)
 
        if ((key_dest != key_menu && key_dest != key_menu_grabbed) || m_state != m_main)
        {
-               if(mode == 1)
-                       return;
+               if(mode == 0)
+                       return; // the menu is off, and we want it off
                M_Menu_Main_f ();
        }
        else
        {
-               if(mode == 0)
-                       return;
+               if(mode == 1)
+                       return; // the menu is on, and we want it on
                key_dest = key_game;
                m_state = m_none;
        }