expanded console buffer from 16k to 128k, and changed scroll amount to be dependent...
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index ff098d5f1fcfe04b5f3e30fbeafccc1f8e107c69..199d311f99a902e41d3c70662967b2b23c705af5 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -282,7 +282,7 @@ void Key_Console (int key)
 
        if (key == K_PGUP || key==K_MWHEELUP)
        {
-               con_backscroll += 2;
+               con_backscroll += ((int) scr_conlines >> 4);
                if (con_backscroll > con_totallines - (vid.conheight>>3) - 1)
                        con_backscroll = con_totallines - (vid.conheight>>3) - 1;
                return;
@@ -290,7 +290,7 @@ void Key_Console (int key)
 
        if (key == K_PGDN || key==K_MWHEELDOWN)
        {
-               con_backscroll -= 2;
+               con_backscroll -= ((int) scr_conlines >> 4);
                if (con_backscroll < 0)
                        con_backscroll = 0;
                return;
@@ -703,25 +703,19 @@ void Key_Event (int key, qboolean down)
        {
                if (!down)
                        return;
-               if (key_consoleactive)
-                       M_ToggleMenu_f ();
-               else
+               switch (key_dest)
                {
-                       switch (key_dest)
-                       {
-                       case key_message:
-                               Key_Message (key);
-                               break;
-                       case key_menu:
-                               M_Keydown (key);
-                               break;
-                       case key_game:
-                       //case key_console:
-                               M_ToggleMenu_f ();
-                               break;
-                       default:
-                               Sys_Error ("Bad key_dest");
-                       }
+               case key_message:
+                       Key_Message (key);
+                       break;
+               case key_menu:
+                       M_Keydown (key);
+                       break;
+               case key_game:
+                       M_ToggleMenu_f ();
+                       break;
+               default:
+                       Sys_Error ("Bad key_dest");
                }
                return;
        }