]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Rename host_t -> host_static_t.
authorRudolf Polzer <divVerent@gmail.com>
Thu, 8 Jul 2021 12:09:01 +0000 (05:09 -0700)
committerRudolf Polzer <divVerent@gmail.com>
Thu, 8 Jul 2021 12:09:01 +0000 (05:09 -0700)
Fixes build on OS X, as host_t is already a typedef for mach_port_t.

host.c
host.h

diff --git a/host.c b/host.c
index efcba3e2f156f479c3a113cfd86035b68a2457bf..e196fe79ce167f064ccf6bd00be6b6a1edd7b90b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -38,7 +38,7 @@ Memory is cleared / released when a server or client begins, not when they end.
 
 */
 
 
 */
 
-host_t host;
+host_static_t host;
 
 // pretend frames take this amount of time (in seconds), 0 = realtime
 cvar_t host_framerate = {CF_CLIENT | CF_SERVER, "host_framerate","0", "locks frame timing to this value in seconds, 0.05 is 20fps for example, note that this can easily run too fast, use cl_maxfps if you want to limit your framerate instead, or sys_ticrate to limit server speed"};
 
 // pretend frames take this amount of time (in seconds), 0 = realtime
 cvar_t host_framerate = {CF_CLIENT | CF_SERVER, "host_framerate","0", "locks frame timing to this value in seconds, 0.05 is 20fps for example, note that this can easily run too fast, use cl_maxfps if you want to limit your framerate instead, or sys_ticrate to limit server speed"};
@@ -683,7 +683,7 @@ static inline void Host_Sleep(double time)
        else
                Sys_Sleep((int)time);
        delta = Sys_DirtyTime() - time0;
        else
                Sys_Sleep((int)time);
        delta = Sys_DirtyTime() - time0;
-       if (delta < 0 || delta >= 1800) 
+       if (delta < 0 || delta >= 1800)
                delta = 0;
        host.sleeptime += delta;
 //                     R_TimeReport("sleep");
                delta = 0;
        host.sleeptime += delta;
 //                     R_TimeReport("sleep");
diff --git a/host.h b/host.h
index 1d553c2509fdf3dbe0ebf8c96adc27879a245729..4521f72b7983a50c57b60b436520613e91222f2e 100644 (file)
--- a/host.h
+++ b/host.h
@@ -16,7 +16,7 @@ typedef enum host_state_e
        host_active
 } host_state_t;
 
        host_active
 } host_state_t;
 
-typedef struct host_s
+typedef struct host_static_s
 {
        jmp_buf abortframe;
        int state;
 {
        jmp_buf abortframe;
        int state;
@@ -38,9 +38,9 @@ typedef struct host_s
                void (*SV_SendCvar)(struct cmd_state_s *);
                void (*SV_Shutdown)(void);
        } hook;
                void (*SV_SendCvar)(struct cmd_state_s *);
                void (*SV_Shutdown)(void);
        } hook;
-} host_t;
+} host_static_t;
 
 
-extern host_t host;
+extern host_static_t host;
 
 void Host_Main(void);
 void Host_Shutdown(void);
 
 void Host_Main(void);
 void Host_Shutdown(void);