- tweak the cl_maxfps sleeping to be more finely grained

- treat empty snd_render/snd_output strings as "don't load"
This commit is contained in:
Adam Olsen 2001-09-19 05:32:20 +00:00
parent bdf45386f0
commit 893c8b784b
2 changed files with 7 additions and 2 deletions

View file

@ -64,6 +64,11 @@ void
S_Init (void)
{
S_Init_Cvars ();
if (!*snd_output->string || !*snd_render->string) {
Con_Printf ("Not loading sound due to no renderer/output\n");
return;
}
snd_output_module = PI_LoadPlugin ("snd_output", snd_output->string);
if (!snd_output_module) {
Con_Printf ("Loading of sound output module: %s failed!\n",

View file

@ -1420,8 +1420,8 @@ Host_Frame (float time)
// decide the simulation time
if ((sleeptime = Host_SimulationTime (time)) != 0) {
#ifdef HAVE_USLEEP
if (sleeptime > 0.01) // minimum sleep time
usleep((unsigned long)((sleeptime - 0.001) * 1000000));
if (sleeptime > 0.002) // minimum sleep time
usleep ((unsigned long)(sleeptime * 1000000 / 2));
#endif
return; // framerate is too high
}