src/video/dga/SDL_dgavideo.h
changeset 101 825b2fa28e2e
parent 0 74212992fb08
child 105 2136ea8953f9
     1.1 --- a/src/video/dga/SDL_dgavideo.h	Wed Jul 11 20:18:52 2001 +0000
     1.2 +++ b/src/video/dga/SDL_dgavideo.h	Thu Jul 12 20:42:22 2001 +0000
     1.3 @@ -37,11 +37,22 @@
     1.4  /* Hidden "this" pointer for the video functions */
     1.5  #define _THIS	SDL_VideoDevice *this
     1.6  
     1.7 +/* Define this if you need the DGA driver to be thread-safe */
     1.8 +#define LOCK_DGA_DISPLAY
     1.9 +#ifdef LOCK_DGA_DISPLAY
    1.10 +#define LOCK_DISPLAY()		SDL_mutexP(event_lock)
    1.11 +#define UNLOCK_DISPLAY()	SDL_mutexV(event_lock)
    1.12 +#else
    1.13 +#define LOCK_DISPLAY()
    1.14 +#define UNLOCK_DISPLAY()
    1.15 +#endif
    1.16 +
    1.17  
    1.18  /* This is the structure we use to keep track of video memory */
    1.19  typedef struct vidmem_bucket {
    1.20  	struct vidmem_bucket *prev;
    1.21 -	unsigned int used;
    1.22 +	int used;
    1.23 +	int dirty;
    1.24  	Uint8 *base;
    1.25  	unsigned int size;
    1.26  	struct vidmem_bucket *next;
    1.27 @@ -82,6 +93,9 @@
    1.28  
    1.29  	/* Used to handle DGA events */
    1.30  	int event_base;
    1.31 +#ifdef LOCK_DGA_DISPLAY
    1.32 +	SDL_mutex *event_lock;
    1.33 +#endif
    1.34  };
    1.35  /* Old variable names */
    1.36  #define DGA_Display		(this->hidden->DGA_Display)
    1.37 @@ -102,5 +116,6 @@
    1.38  #define surfaces_memleft	(this->hidden->surfaces_memleft)
    1.39  #define hw_lock			(this->hidden->hw_lock)
    1.40  #define DGA_event_base		(this->hidden->event_base)
    1.41 +#define event_lock		(this->hidden->event_lock)
    1.42  
    1.43  #endif /* _SDL_dgavideo_h */