]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
clarify in_pitch_* cvar descriptions about upward/downward values
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 18b7a8446ed91e485485dce36603236ef4da46a0..ff8d57860f298bc4780b90a532ee06a72e8f31b5 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -52,6 +52,8 @@ static void Key_History_Init(void)
        qfile_t *historyfile;
        ConBuffer_Init(&history, HIST_TEXTSIZE, HIST_MAXLINES, zonemempool);
 
+// not necessary for mobile
+#ifndef DP_MOBILETOUCH
        historyfile = FS_OpenRealFile("darkplaces_history.txt", "rb", false); // rb to handle unix line endings on windows too
        if(historyfile)
        {
@@ -83,6 +85,7 @@ static void Key_History_Init(void)
 
                FS_Close(historyfile);
        }
+#endif
 
        history_line = -1;
 }
@@ -91,6 +94,8 @@ static void Key_History_Shutdown(void)
 {
        // TODO write history to a file
 
+// not necessary for mobile
+#ifndef DP_MOBILETOUCH
        qfile_t *historyfile = FS_OpenRealFile("darkplaces_history.txt", "w", false);
        if(historyfile)
        {
@@ -99,6 +104,7 @@ static void Key_History_Shutdown(void)
                        FS_Printf(historyfile, "%s\n", ConBuffer_GetLine(&history, i));
                FS_Close(historyfile);
        }
+#endif
 
        ConBuffer_Shutdown(&history);
 }
@@ -108,6 +114,8 @@ static void Key_History_Push(void)
        if(key_line[1]) // empty?
        if(strcmp(key_line, "]quit")) // putting these into the history just sucks
        if(strncmp(key_line, "]quit ", 6)) // putting these into the history just sucks
+       if(strcmp(key_line, "]rcon_password")) // putting these into the history just sucks
+       if(strncmp(key_line, "]rcon_password ", 15)) // putting these into the history just sucks
                ConBuffer_AddLine(&history, key_line + 1, strlen(key_line) - 1, 0);
        Con_Printf("%s\n", key_line); // don't mark empty lines as history
        history_line = -1;
@@ -1840,7 +1848,9 @@ Key_Event (int key, int ascii, qboolean down)
                                        if(key_consoleactive & KEY_CONSOLEACTIVE_FORCED)
                                        {
                                                key_consoleactive &= ~KEY_CONSOLEACTIVE_USER;
+#ifdef CONFIG_MENU
                                                MR_ToggleMenu(1);
+#endif
                                        }
                                        else
                                                Con_ToggleConsole_f();
@@ -1854,14 +1864,18 @@ Key_Event (int key, int ascii, qboolean down)
 
                        case key_menu:
                        case key_menu_grabbed:
+#ifdef CONFIG_MENU
                                MR_KeyEvent (key, ascii, down);
+#endif
                                break;
 
                        case key_game:
                                // csqc has priority over toggle menu if it wants to (e.g. handling escape for UI stuff in-game.. :sick:)
                                q = CL_VM_InputEvent(down ? 0 : 1, key, ascii);
+#ifdef CONFIG_MENU
                                if (!q && down)
                                        MR_ToggleMenu(1);
+#endif
                                break;
 
                        default:
@@ -1929,7 +1943,12 @@ Key_Event (int key, int ascii, qboolean down)
        if (cl_videoplaying)
        {
                if (gamemode == GAME_BLOODOMNICIDE) // menu controls key events
+#ifdef CONFIG_MENU
                        MR_KeyEvent(key, ascii, down);
+#else
+                       {
+                       }
+#endif
                else
                        CL_Video_KeyEvent (key, ascii, keydown[key] != 0);
                return;
@@ -1944,7 +1963,9 @@ Key_Event (int key, int ascii, qboolean down)
                        break;
                case key_menu:
                case key_menu_grabbed:
+#ifdef CONFIG_MENU
                        MR_KeyEvent (key, ascii, down);
+#endif
                        break;
                case key_game:
                        q = CL_VM_InputEvent(down ? 0 : 1, key, ascii);