summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-11-28 01:29:19 +0000
committerTim Angus <tim@ngus.net>2007-11-28 01:29:19 +0000
commit8ae105ea923749d62c707160f87972182b00d42d (patch)
tree51abbd27a5fc57c0b593b83ead4d3871a017b91d /src/client
parentac0f597e31c7ef74796fb13f9c3a6336e315f202 (diff)
* Merge ioq3-r1220
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cl_main.c8
-rw-r--r--src/client/snd_codec.c7
-rw-r--r--src/client/snd_codec.h2
-rw-r--r--src/client/snd_codec_ogg.c12
-rw-r--r--src/client/snd_codec_wav.c4
-rw-r--r--src/client/snd_openal.c7
6 files changed, 19 insertions, 21 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 413a0948..a1701d77 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -37,6 +37,7 @@ cvar_t *rconAddress;
cvar_t *cl_timeout;
cvar_t *cl_maxpackets;
cvar_t *cl_packetdup;
+cvar_t *cl_master;
cvar_t *cl_timeNudge;
cvar_t *cl_showTimeDelta;
cvar_t *cl_freezeDemo;
@@ -933,6 +934,8 @@ void CL_Disconnect( qboolean showMainMenu ) {
// Stop recording any video
if( CL_VideoRecording( ) ) {
+ // Finish rendering current frame
+ SCR_UpdateScreen( );
CL_CloseAVI( );
}
CL_UpdateGUID( NULL, 0 );
@@ -2618,6 +2621,7 @@ void CL_Init( void ) {
cl_timeout = Cvar_Get ("cl_timeout", "200", 0);
+ cl_master = Cvar_Get ("cl_master", MASTER_SERVER_NAME, CVAR_ARCHIVE);
cl_timeNudge = Cvar_Get ("cl_timeNudge", "0", CVAR_TEMP );
cl_shownet = Cvar_Get ("cl_shownet", "0", CVAR_TEMP );
cl_showSend = Cvar_Get ("cl_showSend", "0", CVAR_TEMP );
@@ -3212,12 +3216,12 @@ void CL_GlobalServers_f( void ) {
// -1 is used to distinguish a "no response"
if( cls.masterNum == 1 ) {
- NET_StringToAdr( MASTER_SERVER_NAME, &to );
+ NET_StringToAdr( cl_master->string, &to );
cls.nummplayerservers = -1;
cls.pingUpdateSource = AS_MPLAYER;
}
else {
- NET_StringToAdr( MASTER_SERVER_NAME, &to );
+ NET_StringToAdr( cl_master->string, &to );
cls.numglobalservers = -1;
cls.pingUpdateSource = AS_GLOBAL;
}
diff --git a/src/client/snd_codec.c b/src/client/snd_codec.c
index 0f947551..1b680f87 100644
--- a/src/client/snd_codec.c
+++ b/src/client/snd_codec.c
@@ -227,8 +227,9 @@ snd_stream_t *S_CodecUtilOpen(const char *filename, snd_codec_t *codec)
S_CodecUtilClose
=================
*/
-void S_CodecUtilClose(snd_stream_t *stream)
+void S_CodecUtilClose(snd_stream_t **stream)
{
- FS_FCloseFile(stream->file);
- Z_Free(stream);
+ FS_FCloseFile((*stream)->file);
+ Z_Free(*stream);
+ *stream = NULL;
}
diff --git a/src/client/snd_codec.h b/src/client/snd_codec.h
index 582e65ef..717ae171 100644
--- a/src/client/snd_codec.h
+++ b/src/client/snd_codec.h
@@ -78,7 +78,7 @@ int S_CodecReadStream(snd_stream_t *stream, int bytes, void *buffer);
// Util functions (used by codecs)
snd_stream_t *S_CodecUtilOpen(const char *filename, snd_codec_t *codec);
-void S_CodecUtilClose(snd_stream_t *stream);
+void S_CodecUtilClose(snd_stream_t **stream);
// WAV Codec
extern snd_codec_t wav_codec;
diff --git a/src/client/snd_codec_ogg.c b/src/client/snd_codec_ogg.c
index 764bbd25..3b322b97 100644
--- a/src/client/snd_codec_ogg.c
+++ b/src/client/snd_codec_ogg.c
@@ -251,7 +251,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
vf = Z_Malloc(sizeof(OggVorbis_File));
if(!vf)
{
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -261,7 +261,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
{
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -273,7 +273,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -285,7 +285,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -298,7 +298,7 @@ snd_stream_t *S_OGG_CodecOpenStream(const char *filename)
Z_Free(vf);
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
return NULL;
}
@@ -343,7 +343,7 @@ void S_OGG_CodecCloseStream(snd_stream_t *stream)
Z_Free(stream->ptr);
// close the stream
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
}
/*
diff --git a/src/client/snd_codec_wav.c b/src/client/snd_codec_wav.c
index e38b360e..9c6598f6 100644
--- a/src/client/snd_codec_wav.c
+++ b/src/client/snd_codec_wav.c
@@ -256,7 +256,7 @@ snd_stream_t *S_WAV_CodecOpenStream(const char *filename)
// Read the RIFF header
if(!S_ReadRIFFHeader(rv->file, &rv->info))
{
- S_CodecUtilClose(rv);
+ S_CodecUtilClose(&rv);
return NULL;
}
@@ -270,7 +270,7 @@ S_WAV_CodecCloseStream
*/
void S_WAV_CodecCloseStream(snd_stream_t *stream)
{
- S_CodecUtilClose(stream);
+ S_CodecUtilClose(&stream);
}
/*
diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c
index d8ad48c8..0bda7a1a 100644
--- a/src/client/snd_openal.c
+++ b/src/client/snd_openal.c
@@ -1843,13 +1843,6 @@ void S_AL_Shutdown( void )
S_AL_SrcShutdown( );
S_AL_BufferShutdown( );
- // Check for Linux shutdown race condition
- // FIXME: this will probably not be necessary once OpenAL CVS
- // from 11/11/05 is released and prevelant
- if( Q_stricmp((const char*)qalGetString( AL_VENDOR ), "J. Valenzuela" ) ) {
- qalcMakeContextCurrent( NULL );
- }
-
qalcDestroyContext(alContext);
qalcCloseDevice(alDevice);