From 59d1e032103c4af43759dc4f1b9eaccab7aed1bd Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 6 Apr 2007 11:29:03 +0000 Subject: [PATCH] check vid_activewindow in several spammy prints that occur when the client is running slower than the server changed cl.time warnings from developer 10 to developer 100 and check vid_activewindow git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7062 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 2 +- snd_alsa.c | 4 ++-- snd_coreaudio.c | 2 +- snd_sdl.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index 3ed64190..76b1f806 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -2773,7 +2773,7 @@ static void CL_NetworkTimeReceived(double newtime) { cl.mtime[1] = max(cl.mtime[0], newtime - 0.1); cl.mtime[0] = newtime; - if (developer.integer >= 10) + if (developer.integer >= 100 && vid_activewindow) { if (cl.time < cl.mtime[1] - (cl.mtime[0] - cl.mtime[1])) Con_Printf("--- cl.time < cl.mtime[1] (%f < %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]); diff --git a/snd_alsa.c b/snd_alsa.c index 433e8859..a1d0c262 100644 --- a/snd_alsa.c +++ b/snd_alsa.c @@ -283,7 +283,7 @@ static snd_pcm_sframes_t SndSys_Write (const unsigned char* buffer, unsigned int written = snd_pcm_writei (pcm_handle, buffer, nbframes); if (written < 0) { - if (developer.integer >= 1000) + if (developer.integer >= 1000 && vid_activewindow) Con_Printf ("SndSys_Write: audio write returned %ld (%s)!\n", written, snd_strerror (written)); @@ -361,7 +361,7 @@ unsigned int SndSys_GetSoundTime (void) err = snd_pcm_delay (pcm_handle, &delay); if (err != 0) { - if (developer.integer >= 1000) + if (developer.integer >= 1000 && vid_activewindow) Con_DPrintf ("SndSys_GetSoundTime: can't get playback delay (%s)\n", snd_strerror (err)); diff --git a/snd_coreaudio.c b/snd_coreaudio.c index c07fba02..fa68470d 100644 --- a/snd_coreaudio.c +++ b/snd_coreaudio.c @@ -109,7 +109,7 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice, unsigned int missingFrames; missingFrames = submissionChunk - frameCount; - if (developer.integer >= 1000) + if (developer.integer >= 1000 && vid_activewindow) Con_Printf("audioDeviceIOProc: %u sample frames missing\n", missingFrames); memset(&outBuffer[frameCount * snd_renderbuffer->format.channels], 0, missingFrames * sizeof(outBuffer[0])); } diff --git a/snd_sdl.c b/snd_sdl.c index 571f737c..bcef10da 100644 --- a/snd_sdl.c +++ b/snd_sdl.c @@ -62,7 +62,7 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len) snd_renderbuffer->startframe += FrameCount; - if (FrameCount < RequestedFrames && developer.integer >= 1000) + if (FrameCount < RequestedFrames && developer.integer >= 1000 && vid_activewindow) Con_DPrintf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount); sdlaudiotime += RequestedFrames; -- 2.39.2