]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Got dp to work with very heavy quotation marks
authorLock l00p <hakzstudios@gmail.com>
Sun, 8 Oct 2023 03:20:14 +0000 (03:20 +0000)
committerLock l00p <hakzstudios@gmail.com>
Sun, 8 Oct 2023 03:20:14 +0000 (03:20 +0000)
keys.c
sys_sdl.c

diff --git a/keys.c b/keys.c
index 9ff4853311313e4104819f30b990c603370b3f18..5daa8943fe62baa0a8388ba15f759f5f12e498ab 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -54,6 +54,7 @@ static void Key_History_Init(void)
 
 // not necessary for mobile
 #ifndef DP_MOBILETOUCH
+#ifndef DP_WASM
        historyfile = FS_OpenRealFile("darkplaces_history.txt", "rb", false); // rb to handle unix line endings on windows too
        if(historyfile)
        {
@@ -85,6 +86,7 @@ static void Key_History_Init(void)
 
                FS_Close(historyfile);
        }
+#endif
 #endif
 
        history_line = -1;
@@ -96,6 +98,7 @@ static void Key_History_Shutdown(void)
 
 // not necessary for mobile
 #ifndef DP_MOBILETOUCH
+#ifndef DP_WASM
        qfile_t *historyfile = FS_OpenRealFile("darkplaces_history.txt", "w", false);
        if(historyfile)
        {
@@ -104,6 +107,7 @@ static void Key_History_Shutdown(void)
                        FS_Printf(historyfile, "%s\n", ConBuffer_GetLine(&history, i));
                FS_Close(historyfile);
        }
+#endif
 #endif
 
        ConBuffer_Shutdown(&history);
index 1bf22cd08463c11279ddb3a70c93252a38994e9e..94925886b0710d28b133c0e4e9fba27a45cc529a 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -142,6 +142,7 @@ char *Sys_ConsoleInput(void)
                        len = 0;
        }
 #else
+       #ifndef DP_WASM
        fd_set fdset;
        struct timeval timeout;
        FD_ZERO(&fdset);
@@ -158,6 +159,8 @@ char *Sys_ConsoleInput(void)
                        return text;
                }
        }
+       #endif
+       
 #endif
        return NULL;
 }