-/// incremented every frame, never reset
-extern int host_framecount;
-/// not bounded in any way, changed at start of every frame, never reset
-extern double realtime;
+#ifdef NO_SSE
+# undef SSE_PRESENT
+# undef SSE_POSSIBLE
+# undef SSE2_PRESENT
+#endif
+
+#ifdef SSE_POSSIBLE
+// runtime detection of SSE/SSE2 capabilities for x86
+qbool Sys_HaveSSE(void);
+qbool Sys_HaveSSE2(void);
+#else
+#define Sys_HaveSSE() false
+#define Sys_HaveSSE2() false
+#endif
+
+#include "glquake.h"
+
+#include "palette.h"
+typedef enum host_state_e
+{
+ host_shutdown,
+ host_init,
+ host_loading,
+ host_active
+} host_state_t;
+
+typedef struct host_s
+{
+ jmp_buf abortframe;
+ int state;
+ int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
+ double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping
+ double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
+ double sleeptime; // time spent sleeping overall
+ qbool restless; // don't sleep
+ qbool paused; // global paused state, pauses both client and server
+ cmd_buf_t *cbuf;
+
+ struct
+ {
+ void (*ConnectLocal)(void);
+ } hook;
+} host_t;
+
+extern host_t host;
+extern cvar_t host_isclient;