mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
- 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:
parent
bdf45386f0
commit
893c8b784b
2 changed files with 7 additions and 2 deletions
|
@ -64,6 +64,11 @@ void
|
||||||
S_Init (void)
|
S_Init (void)
|
||||||
{
|
{
|
||||||
S_Init_Cvars ();
|
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);
|
snd_output_module = PI_LoadPlugin ("snd_output", snd_output->string);
|
||||||
if (!snd_output_module) {
|
if (!snd_output_module) {
|
||||||
Con_Printf ("Loading of sound output module: %s failed!\n",
|
Con_Printf ("Loading of sound output module: %s failed!\n",
|
||||||
|
|
|
@ -1420,8 +1420,8 @@ Host_Frame (float time)
|
||||||
// decide the simulation time
|
// decide the simulation time
|
||||||
if ((sleeptime = Host_SimulationTime (time)) != 0) {
|
if ((sleeptime = Host_SimulationTime (time)) != 0) {
|
||||||
#ifdef HAVE_USLEEP
|
#ifdef HAVE_USLEEP
|
||||||
if (sleeptime > 0.01) // minimum sleep time
|
if (sleeptime > 0.002) // minimum sleep time
|
||||||
usleep((unsigned long)((sleeptime - 0.001) * 1000000));
|
usleep ((unsigned long)(sleeptime * 1000000 / 2));
|
||||||
#endif
|
#endif
|
||||||
return; // framerate is too high
|
return; // framerate is too high
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue