From 32e959e88a34f14b70f3a80c34c260e70bbfa528 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sun, 16 Dec 2012 20:35:50 +0100 Subject: [PATCH] popen/pclose changed to _popen/_pclose for Windows --- utils/fgviewer/MEncoderCaptureOperation.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/fgviewer/MEncoderCaptureOperation.hxx b/utils/fgviewer/MEncoderCaptureOperation.hxx index 051996584..c67697836 100644 --- a/utils/fgviewer/MEncoderCaptureOperation.hxx +++ b/utils/fgviewer/MEncoderCaptureOperation.hxx @@ -104,7 +104,7 @@ private: << _fps << ":w=" << _width << ":h=" << _height << ":format=rgb24 -o " << _fileName << " " << _options; #ifdef _WIN32 - _file = popen(ss.str().c_str(), "wb"); + _file = _popen(ss.str().c_str(), "wb"); #else _file = popen(ss.str().c_str(), "w"); #endif @@ -114,7 +114,11 @@ private: { if (!_file) return; +#ifdef _WIN32 + _pclose(_file); +#else pclose(_file); +#endif _file = 0; }