diff --git a/engine/client/cl_screen.c b/engine/client/cl_screen.c index 057d0f694..15d968925 100644 --- a/engine/client/cl_screen.c +++ b/engine/client/cl_screen.c @@ -78,6 +78,7 @@ void RSpeedShow(void) RSpNames[RSPEED_PROTOCOL] = "Client Protocol"; RSpNames[RSPEED_SERVER] = "Server"; + RSpNames[RSPEED_AUDIO] = "Audio"; memset(RQntNames, 0, sizeof(RQntNames)); RQntNames[RQUANT_MSECS] = "Microseconds"; diff --git a/engine/client/m_download.c b/engine/client/m_download.c index 87becc57a..ac76c1d3d 100644 --- a/engine/client/m_download.c +++ b/engine/client/m_download.c @@ -2811,10 +2811,6 @@ static void PM_Plugin_Source_Finished(void *ctx, vfsfile_t *f) PM_ListDownloaded(&dl); } } - else - { - Con_Printf("PM_Plugin_Source_Finished: stale\n"); - } VFS_CLOSE(f); } static void PM_Plugin_Source_CacheFinished(void *ctx, vfsfile_t *f) @@ -2836,10 +2832,6 @@ static void PM_Plugin_Source_CacheFinished(void *ctx, vfsfile_t *f) PM_ListDownloaded(&dl); } } - else - { - Con_Printf("PM_Plugin_Source_CacheFinished: stale\n"); - } VFS_CLOSE(f); } #endif diff --git a/engine/client/render.h b/engine/client/render.h index 2b75767c6..64c58320f 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -753,6 +753,7 @@ enum { RSPEED_PALETTEFLASHES, RSPEED_2D, RSPEED_SERVER, + RSPEED_AUDIO, RSPEED_SETUP, RSPEED_SUBMIT, RSPEED_PRESENT, diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index 85c186a0e..00817a4d0 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -3889,7 +3889,7 @@ static void S_UpdateCard(soundcardinfo_t *sc) if (ch->sfx && (ch->vol[0] || ch->vol[1]) ) { if (snd_show.ival > 1) - Con_Printf ("%i, %i %i %i %i %i %i %s\n", i, ch->vol[0], ch->vol[1], ch->vol[2], ch->vol[3], ch->vol[4], ch->vol[5], ch->sfx->name); + Con_Printf ("%i, %i/%i/%i/%i/%i/%i %s\n", i, ch->vol[0], ch->vol[1], ch->vol[2], ch->vol[3], ch->vol[4], ch->vol[5], ch->sfx->name); active++; } else if (ch->sfx) @@ -3961,11 +3961,12 @@ int S_GetMixerTime(soundcardinfo_t *sc) void S_Update (void) { soundcardinfo_t *sc; - + RSpeedMark(); S_LockMixer(); for (sc = sndcardinfo; sc; sc = sc->next) S_UpdateCard(sc); S_UnlockMixer(); + RSpeedEnd(RSPEED_AUDIO); } void S_ExtraUpdate (void) diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index 13b47cc33..276c5a835 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -2012,6 +2012,7 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip for (end = *name?strchr(name+1, '#'):NULL; end && *end; ) { + size_t startoffset=offset; char *start = end+1; end = strchr(start, '#'); if (!end) @@ -2027,11 +2028,26 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip { if (*start == '=') { + if (offset == startoffset+8) + break; start++; prescript[offset++] = ' '; break; } - prescript[offset++] = toupper(*start++); + if ((*start >='a'&&*start<='z')||(*start >='A'&&*start<='Z')||*start=='_'||(*start >='0'&&*start<='9'&&offset>startoffset+8)) + prescript[offset++] = toupper(*start++); + else + { ///invalid symbol name... + offset = startoffset+8; + prescript[offset] = 0; + break; + } + } + if (offset == startoffset+8) + { ///invalid symbol name... + offset = startoffset; + prescript[offset] = 0; + break; } while (offset < sizeof(prescript) && start < end) prescript[offset++] = toupper(*start++);