From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Wed, 17 Jul 2013 04:03:07 +0000 (+0000)
Subject: added #ifndef DP_MOBILETOUCH on the command history and ip logging
X-Git-Tag: xonotic-v0.8.0~96^2~70
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4dcb08525484896d8f1d1b8439ccd0af572dd73;p=xonotic%2Fdarkplaces.git

added #ifndef DP_MOBILETOUCH on the command history and ip logging

credit: EluanCM


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

diff --git a/cl_parse.c b/cl_parse.c
index 65809f42..c16b8eaa 100644
--- a/cl_parse.c
+++ b/cl_parse.c
@@ -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 0168b3f9..30bb4f9e 100644
--- 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);
 }