Adds a check to the record movie call so that it only happens in Release mode, to avoid crash issues with theora and debug mode.

This commit is contained in:
Areloch 2017-01-30 20:36:48 -06:00
parent 8985cbb0d3
commit 501b55d939

View file

@ -314,6 +314,9 @@ DefineEngineFunction( startVideoCapture, void,
"@see stopVideoCapture\n" "@see stopVideoCapture\n"
"@ingroup Rendering\n" ) "@ingroup Rendering\n" )
{ {
#ifdef TORQUE_DEBUG
Con::errorf("Recording video is disabled in debug!");
#else
if ( !canvas ) if ( !canvas )
{ {
Con::errorf("startVideoCapture -Please specify a GuiCanvas object to record from!"); Con::errorf("startVideoCapture -Please specify a GuiCanvas object to record from!");
@ -328,6 +331,7 @@ DefineEngineFunction( startVideoCapture, void,
VIDCAP->setResolution(resolution); VIDCAP->setResolution(resolution);
VIDCAP->begin(canvas); VIDCAP->begin(canvas);
#endif
} }
DefineEngineFunction( stopVideoCapture, void, (),, DefineEngineFunction( stopVideoCapture, void, (),,