From 25f108d6a98d894471fae9f5e87b5f67e5fc413a Mon Sep 17 00:00:00 2001 From: eihrul Date: Sat, 5 Feb 2011 00:26:14 +0000 Subject: [PATCH] attempted fix for VC compile errors git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10804 d7cf8633-e32d-0410-b094-e92efae38249 --- dpsoftrast.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dpsoftrast.c b/dpsoftrast.c index f26266a8..9e5c4d8d 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -6,12 +6,7 @@ #include "dpsoftrast.h" #ifdef USE_SDL -#define USE_THREADS -#endif - -#ifdef USE_THREADS -#include -#include +//#define USE_THREADS #endif #ifndef __cplusplus @@ -55,12 +50,18 @@ typedef qboolean bool; #define ATOMIC(var) var #endif -#ifndef USE_THREADS +#ifdef USE_THREADS +#include +#include +#else #define MEMORY_BARRIER ((void)0) #define ATOMIC_COUNTER int #define ATOMIC_INCREMENT(counter) (++(counter)) #define ATOMIC_DECREMENT(counter) (--(counter)) #define ATOMIC_ADD(counter, val) ((void)((counter) += (val))) + typedef void SDL_Thread; + typedef void SDL_cond; + typedef void SDL_mutex; #endif #ifdef SSE2_PRESENT @@ -210,9 +211,7 @@ DPSOFTRAST_BLENDMODE; typedef ATOMIC(struct DPSOFTRAST_State_Thread_s { -#ifdef USE_THREADS SDL_Thread *thread; -#endif int index; int cullface; @@ -258,11 +257,9 @@ typedef ATOMIC(struct DPSOFTRAST_State_Thread_s volatile bool waiting; volatile bool starving; -#ifdef USE_THREADS SDL_cond *waitcond; SDL_cond *drawcond; SDL_mutex *drawmutex; -#endif int numspans; int numtriangles; -- 2.39.2