From c46ca119c15de3a837d89f5e5a9a3fbb60913111 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 17 Jul 2013 04:03:07 +0000 Subject: [PATCH] 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 ::stable-branch::merge=b4dcb08525484896d8f1d1b8439ccd0af572dd73 --- cl_parse.c | 8 ++++++++ keys.c | 6 ++++++ 2 files changed, 14 insertions(+) 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); } -- 2.39.2