]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added #ifndef DP_MOBILETOUCH on the command history and ip logging
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Jul 2013 04:03:07 +0000 (04:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Jul 2013 04:03:07 +0000 (04:03 +0000)
credit: EluanCM

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11970 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
keys.c

index 65809f42734d5527cc094b7de6829411da1cec0f..c16b8eaae4d45bc3a644e3c824c6f4f6a6774200 100644 (file)
@@ -3006,9 +3006,12 @@ static void CL_IPLog_Add(const char *address, const char *name, qboolean checkex
                // add it to the iplog.txt file
                // TODO: this ought to open the one in the userpath version of the base
                // gamedir, not the current gamedir
+// not necessary for mobile
+#ifndef DP_MOBILETOUCH
                Log_Printf(cl_iplog_name.string, "%s %s\n", address, name);
                if (developer_extra.integer)
                        Con_DPrintf("CL_IPLog_Add: appending this line to %s: %s %s\n", cl_iplog_name.string, address, name);
+#endif
        }
 }
 
@@ -3023,7 +3026,12 @@ static void CL_IPLog_Load(void)
        cl_iplog_loaded = true;
        // TODO: this ought to open the one in the userpath version of the base
        // gamedir, not the current gamedir
+// not necessary for mobile
+#ifndef DP_MOBILETOUCH
        filedata = FS_LoadFile(cl_iplog_name.string, tempmempool, true, &filesize);
+#else
+       filedata = NULL;
+#endif
        if (!filedata)
                return;
        text = (char *)filedata;
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);
 }