]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
cl_cmd: Make _cl_color not read-only. That was annoying.
[xonotic/darkplaces.git] / sys_shared.c
index d6081605f701b596ac716b65750cd70d1afc74f9..4898c82a02a1b0e8ea1315f1853f87b13b94a2dc 100644 (file)
@@ -48,9 +48,9 @@ char *Sys_TimeString(const char *timeformat)
 void Sys_Quit (int returnvalue)
 {
        // Unlock mutexes because the quit command may jump directly here, causing a deadlock
-       if (cmd_client.text_lock)
+       if (cmd_client.text_mutex)
                Cbuf_Unlock(&cmd_client);
-       if (cmd_server.text_lock)
+       if (cmd_server.text_mutex)
                Cbuf_Unlock(&cmd_server);
        SV_UnlockThreadMutex();
        TaskQueue_Frame(true);
@@ -334,13 +334,8 @@ double Sys_DirtyTime(void)
                {
                        QueryPerformanceCounter (&PerformanceCount);
        
-                       #ifdef __BORLANDC__
-                       timescale = 1.0 / ((double) PerformanceFreq.u.LowPart + (double) PerformanceFreq.u.HighPart * 65536.0 * 65536.0);
-                       return ((double) PerformanceCount.u.LowPart + (double) PerformanceCount.u.HighPart * 65536.0 * 65536.0) * timescale;
-                       #else
                        timescale = 1.0 / ((double) PerformanceFreq.LowPart + (double) PerformanceFreq.HighPart * 65536.0 * 65536.0);
                        return ((double) PerformanceCount.LowPart + (double) PerformanceCount.HighPart * 65536.0 * 65536.0) * timescale;
-                       #endif
                }
                else
                {
@@ -534,7 +529,7 @@ void Sys_ProvideSelfFD(void)
 static int CPUID_Features(void)
 {
        int features = 0;
-# if defined(__GNUC__) && defined(__i386__)
+# if defined((__GNUC__) || (__clang__) || (__TINYC__)) && defined(__i386__)
         __asm__ (
 "        movl    %%ebx,%%edi\n"
 "        xorl    %%eax,%%eax                                           \n"