-// because sound is off until we become active
- S_BlockSound ();
-
- Host_Init ();
-
- Sys_Shared_LateInit();
-
- frameoldtime = Sys_DoubleTime ();
-
- /* main window message loop */
- while (1)
- {
- if (cls.state != ca_dedicated)
- {
- // yield the CPU for a little while when paused, minimized, or not the focus
- if ((cl.paused && !vid_activewindow) || vid_hidden)
- {
- SleepUntilInput (PAUSE_SLEEP);
- scr_skipupdate = 1; // no point in bothering to draw
- }
- else if (!vid_activewindow)
- SleepUntilInput (NOT_FOCUS_SLEEP);
- }
-
- framenewtime = Sys_DoubleTime ();
- Host_Frame (framenewtime - frameoldtime);
- frameoldtime = framenewtime;
- }