From 23d02ca7ddf9a917ef5733913f52d201fe02ab7b Mon Sep 17 00:00:00 2001 From: Lock l00p Date: Sun, 8 Oct 2023 03:20:14 +0000 Subject: [PATCH] Got dp to work with very heavy quotation marks --- keys.c | 4 ++++ sys_sdl.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/keys.c b/keys.c index 9ff48533..5daa8943 100644 --- 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); diff --git a/sys_sdl.c b/sys_sdl.c index 1bf22cd0..94925886 100644 --- 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; } -- 2.39.2