summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mp_msg.c1
-rw-r--r--stream/cache2.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/mp_msg.c b/mp_msg.c
index 7f4ff70e87..76fdc06765 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -16,6 +16,7 @@ extern char* get_term_charset(void);
#if defined(FOR_MENCODER)
#undef HAVE_NEW_GUI
+int use_gui;
#endif
#ifdef HAVE_NEW_GUI
diff --git a/stream/cache2.c b/stream/cache2.c
index 0e6f2eef9b..65259cfb60 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -29,6 +29,7 @@ static DWORD WINAPI ThreadProc(void* s);
#include "stream.h"
#include "input/input.h"
+extern int use_gui;
int stream_fill_buffer(stream_t *s);
int stream_seek_long(stream_t *s,off_t pos);
@@ -305,6 +306,9 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){
static DWORD WINAPI ThreadProc(void*s){
#endif
+#ifdef HAVE_NEW_GUI
+ use_gui = 0; // mp_msg may not use gui stuff in forked code
+#endif
// cache thread mainloop:
signal(SIGTERM,exit_sighandler); // kill
while(1){