Some minor name changes to clean up
authorSam Lantinga <slouken@lokigames.com>
Fri, 13 Jul 2001 10:15:52 +0000
changeset 1052136ea8953f9
parent 104 a746656b7599
child 106 63ec24e0575f
Some minor name changes to clean up
src/video/dga/SDL_dgavideo.c
src/video/dga/SDL_dgavideo.h
     1.1 --- a/src/video/dga/SDL_dgavideo.c	Fri Jul 13 01:21:59 2001 +0000
     1.2 +++ b/src/video/dga/SDL_dgavideo.c	Fri Jul 13 10:15:52 2001 +0000
     1.3 @@ -631,17 +631,17 @@
     1.4  	surfaces.next = NULL;
     1.5  }
     1.6  
     1.7 -static __inline__ void DGA_AddDirtySurface(SDL_Surface *surface)
     1.8 +static __inline__ void DGA_AddBusySurface(SDL_Surface *surface)
     1.9  {
    1.10  	((vidmem_bucket *)surface->hwdata)->dirty = 1;
    1.11  }
    1.12  
    1.13 -static __inline__ int DGA_IsSurfaceDirty(SDL_Surface *surface)
    1.14 +static __inline__ int DGA_IsSurfaceBusy(SDL_Surface *surface)
    1.15  {
    1.16  	return ((vidmem_bucket *)surface->hwdata)->dirty;
    1.17  }
    1.18  
    1.19 -static __inline__ void DGA_WaitDirtySurfaces(_THIS)
    1.20 +static __inline__ void DGA_WaitBusySurfaces(_THIS)
    1.21  {
    1.22  	vidmem_bucket *bucket;
    1.23  
    1.24 @@ -783,7 +783,7 @@
    1.25  	surface->hwdata = NULL;
    1.26  }
    1.27  
    1.28 -static __inline__ void dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y)
    1.29 +static __inline__ void DGA_dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y)
    1.30  {
    1.31  	*x = (long)((Uint8 *)dst->pixels - memory_base)%memory_pitch;
    1.32  	*y = (long)((Uint8 *)dst->pixels - memory_base)/memory_pitch;
    1.33 @@ -805,7 +805,7 @@
    1.34  			/* Keep waiting for the hardware ... */ ;
    1.35  		was_flipped = 0;
    1.36  	}
    1.37 -	dst_to_xy(this, dst, &x, &y);
    1.38 +	DGA_dst_to_xy(this, dst, &x, &y);
    1.39  	x += rect->x;
    1.40  	y += rect->y;
    1.41  	w = rect->w;
    1.42 @@ -815,7 +815,7 @@
    1.43  #endif
    1.44  	XDGAFillRectangle(DGA_Display, DGA_Screen, x, y, w, h, color);
    1.45  	XFlush(DGA_Display);
    1.46 -	DGA_AddDirtySurface(dst);
    1.47 +	DGA_AddBusySurface(dst);
    1.48  	UNLOCK_DISPLAY();
    1.49  	return(0);
    1.50  }
    1.51 @@ -836,10 +836,10 @@
    1.52  			/* Keep waiting for the hardware ... */ ;
    1.53  		was_flipped = 0;
    1.54  	}
    1.55 -	dst_to_xy(this, src, &srcx, &srcy);
    1.56 +	DGA_dst_to_xy(this, src, &srcx, &srcy);
    1.57  	srcx += srcrect->x;
    1.58  	srcy += srcrect->y;
    1.59 -	dst_to_xy(this, dst, &dstx, &dsty);
    1.60 +	DGA_dst_to_xy(this, dst, &dstx, &dsty);
    1.61  	dstx += dstrect->x;
    1.62  	dsty += dstrect->y;
    1.63  	w = srcrect->w;
    1.64 @@ -855,8 +855,8 @@
    1.65  			srcx, srcy, w, h, dstx, dsty);
    1.66  	}
    1.67  	XFlush(DGA_Display);
    1.68 -	DGA_AddDirtySurface(src);
    1.69 -	DGA_AddDirtySurface(dst);
    1.70 +	DGA_AddBusySurface(src);
    1.71 +	DGA_AddBusySurface(dst);
    1.72  	UNLOCK_DISPLAY();
    1.73  	return(0);
    1.74  }
    1.75 @@ -902,15 +902,15 @@
    1.76  	if ( surface == this->screen ) {
    1.77  		SDL_mutexP(hw_lock);
    1.78  		LOCK_DISPLAY();
    1.79 -		if ( DGA_IsSurfaceDirty(surface) ) {
    1.80 -			DGA_WaitDirtySurfaces(this);
    1.81 +		if ( DGA_IsSurfaceBusy(surface) ) {
    1.82 +			DGA_WaitBusySurfaces(this);
    1.83  		}
    1.84  		DGA_WaitFlip(this);
    1.85  		UNLOCK_DISPLAY();
    1.86  	} else {
    1.87 -		if ( DGA_IsSurfaceDirty(surface) ) {
    1.88 +		if ( DGA_IsSurfaceBusy(surface) ) {
    1.89  			LOCK_DISPLAY();
    1.90 -			DGA_WaitDirtySurfaces(this);
    1.91 +			DGA_WaitBusySurfaces(this);
    1.92  			UNLOCK_DISPLAY();
    1.93  		}
    1.94  	}
    1.95 @@ -927,8 +927,8 @@
    1.96  {
    1.97  	/* Wait for vertical retrace and then flip display */
    1.98  	LOCK_DISPLAY();
    1.99 -	if ( DGA_IsSurfaceDirty(this->screen) ) {
   1.100 -		DGA_WaitDirtySurfaces(this);
   1.101 +	if ( DGA_IsSurfaceBusy(this->screen) ) {
   1.102 +		DGA_WaitBusySurfaces(this);
   1.103  	}
   1.104  	DGA_WaitFlip(this);
   1.105  	XDGASetViewport(DGA_Display, DGA_Screen,
     2.1 --- a/src/video/dga/SDL_dgavideo.h	Fri Jul 13 01:21:59 2001 +0000
     2.2 +++ b/src/video/dga/SDL_dgavideo.h	Fri Jul 13 10:15:52 2001 +0000
     2.3 @@ -58,12 +58,6 @@
     2.4  	struct vidmem_bucket *next;
     2.5  } vidmem_bucket;
     2.6  
     2.7 -/* Information about the location of the surface in hardware memory */
     2.8 -struct private_hwdata {
     2.9 -	int x;
    2.10 -	int y;
    2.11 -};
    2.12 -
    2.13  /* Private display data */
    2.14  struct SDL_PrivateVideoData {
    2.15  	Display *DGA_Display;