File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ struct refimport_t {
217217 int ( *FS_FOpenFileRead )( const char * qpath, fileHandle_t* file );
218218
219219 // XreaL BEGIN
220- bool ( *CL_VideoRecording )( );
220+ int ( *CL_VideoRecording )( );
221221 void ( *CL_WriteAVIVideoFrame )( const byte* buffer, int size );
222222 // XreaL END
223223
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ bool CL_CloseAVI()
612612CL_VideoRecording
613613===============
614614*/
615- bool CL_VideoRecording ()
615+ int CL_VideoRecording ()
616616{
617- return afd.fileOpen ;
617+ return afd.fileOpen ? afd. frameRate : 0 ;
618618}
Original file line number Diff line number Diff line change @@ -2013,15 +2013,16 @@ void CL_Frame( int msec )
20132013 }
20142014
20152015 // if recording an avi, lock to a fixed fps
2016- if ( CL_VideoRecording () && cl_aviFrameRate->integer && msec )
2016+ int framerate;
2017+ if ( ( framerate = CL_VideoRecording () ) && msec )
20172018 {
20182019 // save the current screen
20192020 if ( cls.state == connstate_t ::CA_ACTIVE )
20202021 {
20212022 CL_TakeVideoFrame ();
20222023
20232024 // fixed time for next frame
2024- msec = ( int ) ceil ( ( 1000 .0f / cl_aviFrameRate-> value ) * com_timescale->value );
2025+ msec = ( int ) ceil ( ( 1000 .0f / framerate ) * com_timescale->value );
20252026
20262027 if ( msec == 0 )
20272028 {
Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ bool CL_OpenAVIForWriting( const char *filename );
667667void CL_TakeVideoFrame ();
668668void CL_WriteAVIVideoFrame ( const byte *imageBuffer, int size );
669669bool CL_CloseAVI ();
670- bool CL_VideoRecording ();
670+ int CL_VideoRecording ();
671671
672672// XreaL END
673673
You can’t perform that action at this time.
0 commit comments