From 6c4cea3954833a14e2fe44434236962579e934ae Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 2 Aug 2017 14:42:05 +0200 Subject: [PATCH] Fix for Cygwin input crashes --- src/input/input.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/input/input.cpp b/src/input/input.cpp index 41ce1820..62f29d18 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -124,6 +124,11 @@ namespace Mist { while (config->is_active){ pid_t pid = fork(); if (pid == 0){ + //Re-init streamStatus to fix Cygwin issues + char pageName[NAME_BUFFER_SIZE]; + snprintf(pageName, NAME_BUFFER_SIZE, SHM_STREAM_STATE, streamName.c_str()); + streamStatus.init(pageName, 1, false, false); + if (streamStatus){streamStatus.mapped[0] = STRMSTAT_INIT;} if (needsLock()){playerLock.close();} if (!preRun()){return 0;} return run();