From 70833a6e6947c6821c28a84f7c04268585abc19e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 30 Aug 2021 00:41:40 +0600 Subject: [PATCH] Disable monitor interface if CLI text-mode is enabled --- src/unix/unix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix/unix.c b/src/unix/unix.c index 6fd91f46c..0121d451f 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -720,6 +720,7 @@ uint32_t timer_onesec(uint32_t interval, void* param) void monitor_thread(void* param) { +#ifndef USE_CLI if (isatty(fileno(stdin)) && isatty(fileno(stdout))) { char* line = NULL; @@ -940,6 +941,7 @@ void monitor_thread(void* param) } } } +#endif } int main(int argc, char** argv) @@ -991,7 +993,9 @@ int main(int argc, char** argv) /* Initialize the rendering window, or fullscreen. */ do_start(); +#ifndef USE_CLI thread_create(monitor_thread, NULL); +#endif SDL_AddTimer(1000, timer_onesec, NULL); while (!is_quit) {