From 526ac642a8c0a77c3271d1ad4fa3e6a2fd751bd2 Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 6 Jan 2006 22:28:07 +0000 Subject: * Oops. Rename cl_avidemo to cl_aviFrameRate git-svn-id: svn://svn.icculus.org/quake3/trunk@468 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_avi.c | 10 +++++----- code/client/cl_main.c | 8 ++++---- code/client/client.h | 2 +- code/client/snd_dma.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/client/cl_avi.c b/code/client/cl_avi.c index 4a372d8..178260b 100644 --- a/code/client/cl_avi.c +++ b/code/client/cl_avi.c @@ -332,9 +332,9 @@ qboolean CL_OpenAVIForWriting( const char *fileName ) Com_Memset( &afd, 0, sizeof( aviFileData_t ) ); // Don't start if a framerate has not been chosen - if( cl_avidemo->integer <= 0 ) + if( cl_aviFrameRate->integer <= 0 ) { - Com_Printf( S_COLOR_RED "cl_avidemo must be >= 1\n" ); + Com_Printf( S_COLOR_RED "cl_aviFrameRate must be >= 1\n" ); return qfalse; } @@ -349,7 +349,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName ) Q_strncpyz( afd.fileName, fileName, MAX_QPATH ); - afd.frameRate = cl_avidemo->integer; + afd.frameRate = cl_aviFrameRate->integer; afd.framePeriod = (int)( 1000000.0f / afd.frameRate ); afd.width = cls.glconfig.vidWidth; afd.height = cls.glconfig.vidHeight; @@ -375,7 +375,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName ) while( ( afd.a.rate % suggestRate ) && suggestRate >= 1 ) suggestRate--; - Com_Printf( S_COLOR_YELLOW "WARNING: cl_avidemo is not a divisor " + Com_Printf( S_COLOR_YELLOW "WARNING: cl_aviFrameRate is not a divisor " "of the audio rate, suggest %d\n", suggestRate ); } @@ -484,7 +484,7 @@ void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size ) bytesInBuffer += size; // Only write if we have a frame's worth of audio - if( bytesInBuffer >= (int)ceil( afd.a.rate / cl_avidemo->value ) * + if( bytesInBuffer >= (int)ceil( afd.a.rate / cl_aviFrameRate->value ) * afd.a.sampleSize ) { int chunkOffset = afd.fileSize - afd.moviOffset - 8; diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 8871490..8f0168a 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -44,7 +44,7 @@ cvar_t *cl_shownet; cvar_t *cl_showSend; cvar_t *cl_timedemo; cvar_t *cl_autoRecordDemo; -cvar_t *cl_avidemo; +cvar_t *cl_aviFrameRate; cvar_t *cl_aviMotionJpeg; cvar_t *cl_forceavidemo; @@ -2026,13 +2026,13 @@ void CL_Frame ( int msec ) { } // if recording an avi, lock to a fixed fps - if ( CL_VideoRecording( ) && cl_avidemo->integer && msec) { + if ( CL_VideoRecording( ) && cl_aviFrameRate->integer && msec) { // save the current screen if ( cls.state == CA_ACTIVE || cl_forceavidemo->integer) { CL_TakeVideoFrame( ); // fixed time for next frame' - msec = (int)ceil( (1000.0f / cl_avidemo->value) * com_timescale->value ); + msec = (int)ceil( (1000.0f / cl_aviFrameRate->value) * com_timescale->value ); if (msec == 0) { msec = 1; } @@ -2414,7 +2414,7 @@ void CL_Init( void ) { cl_timedemo = Cvar_Get ("timedemo", "0", 0); cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE); - cl_avidemo = Cvar_Get ("cl_avidemo", "25", CVAR_ARCHIVE); + cl_aviFrameRate = Cvar_Get ("cl_aviFrameRate", "25", CVAR_ARCHIVE); cl_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE); cl_forceavidemo = Cvar_Get ("cl_forceavidemo", "0", 0); diff --git a/code/client/client.h b/code/client/client.h index 946b259..599d494 100644 --- a/code/client/client.h +++ b/code/client/client.h @@ -343,7 +343,7 @@ extern cvar_t *m_side; extern cvar_t *m_filter; extern cvar_t *cl_timedemo; -extern cvar_t *cl_avidemo; +extern cvar_t *cl_aviFrameRate; extern cvar_t *cl_aviMotionJpeg; extern cvar_t *cl_activeAction; diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c index 0505403..57ccea5 100644 --- a/code/client/snd_dma.c +++ b/code/client/snd_dma.c @@ -1141,7 +1141,7 @@ void S_GetSoundtime(void) if( CL_VideoRecording( ) ) { - s_soundtime += (int)ceil( dma.speed / cl_avidemo->value ); + s_soundtime += (int)ceil( dma.speed / cl_aviFrameRate->value ); return; } -- cgit v1.2.3