From 88cbcd202cc5457d61410ee6ec2f4c8ded1e04f2 Mon Sep 17 00:00:00 2001 From: Benau Date: Sat, 18 Mar 2017 16:06:38 +0800 Subject: [PATCH] Don't enable AVIWriter if PBO is not usable --- src/graphics/irr_driver.cpp | 4 ++++ src/graphics/irr_driver.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 3e3dabcc3..b1b537797 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -1896,11 +1896,15 @@ void IrrDriver::update(float dt) // ---------------------------------------------------------------------------- void IrrDriver::setRecording(bool val) { +#ifndef SERVER_ONLY + if (!CVS->isARBPixelBufferObjectUsable()) + return; if (val == false && m_recording == false) return; m_recording = val; if (val == false) AVIWriter::getInstance()->stopRecording(); +#endif } // setRecording // ---------------------------------------------------------------------------- diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index 5aa7a5e45..21d6a611c 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -575,4 +575,4 @@ public: extern IrrDriver *irr_driver; -#endif // HEADER_IRR_DRIVER_HPP \ No newline at end of file +#endif // HEADER_IRR_DRIVER_HPP