]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
added #ifndef DP_MOBILETOUCH on the command history and ip logging
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 0168b3f93ee16cd3d76379ab56612f0595ab7865..30bb4f9e15fab47fa9a8a0cb7008552d193cad0d 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);
 }