Navigation Menu

Skip to content

Commit

Permalink
Some minor name changes to clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lantinga committed Jul 13, 2001
1 parent 289389b commit 0d9c8e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
32 changes: 16 additions & 16 deletions src/video/dga/SDL_dgavideo.c
Expand Up @@ -631,17 +631,17 @@ static void DGA_FreeHWSurfaces(_THIS)
surfaces.next = NULL;
}

static __inline__ void DGA_AddDirtySurface(SDL_Surface *surface)
static __inline__ void DGA_AddBusySurface(SDL_Surface *surface)
{
((vidmem_bucket *)surface->hwdata)->dirty = 1;
}

static __inline__ int DGA_IsSurfaceDirty(SDL_Surface *surface)
static __inline__ int DGA_IsSurfaceBusy(SDL_Surface *surface)
{
return ((vidmem_bucket *)surface->hwdata)->dirty;
}

static __inline__ void DGA_WaitDirtySurfaces(_THIS)
static __inline__ void DGA_WaitBusySurfaces(_THIS)
{
vidmem_bucket *bucket;

Expand Down Expand Up @@ -783,7 +783,7 @@ static void DGA_FreeHWSurface(_THIS, SDL_Surface *surface)
surface->hwdata = NULL;
}

static __inline__ void dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y)
static __inline__ void DGA_dst_to_xy(_THIS, SDL_Surface *dst, int *x, int *y)
{
*x = (long)((Uint8 *)dst->pixels - memory_base)%memory_pitch;
*y = (long)((Uint8 *)dst->pixels - memory_base)/memory_pitch;
Expand All @@ -805,7 +805,7 @@ static int DGA_FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color)
/* Keep waiting for the hardware ... */ ;
was_flipped = 0;
}
dst_to_xy(this, dst, &x, &y);
DGA_dst_to_xy(this, dst, &x, &y);
x += rect->x;
y += rect->y;
w = rect->w;
Expand All @@ -815,7 +815,7 @@ static int DGA_FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color)
#endif
XDGAFillRectangle(DGA_Display, DGA_Screen, x, y, w, h, color);
XFlush(DGA_Display);
DGA_AddDirtySurface(dst);
DGA_AddBusySurface(dst);
UNLOCK_DISPLAY();
return(0);
}
Expand All @@ -836,10 +836,10 @@ static int HWAccelBlit(SDL_Surface *src, SDL_Rect *srcrect,
/* Keep waiting for the hardware ... */ ;
was_flipped = 0;
}
dst_to_xy(this, src, &srcx, &srcy);
DGA_dst_to_xy(this, src, &srcx, &srcy);
srcx += srcrect->x;
srcy += srcrect->y;
dst_to_xy(this, dst, &dstx, &dsty);
DGA_dst_to_xy(this, dst, &dstx, &dsty);
dstx += dstrect->x;
dsty += dstrect->y;
w = srcrect->w;
Expand All @@ -855,8 +855,8 @@ static int HWAccelBlit(SDL_Surface *src, SDL_Rect *srcrect,
srcx, srcy, w, h, dstx, dsty);
}
XFlush(DGA_Display);
DGA_AddDirtySurface(src);
DGA_AddDirtySurface(dst);
DGA_AddBusySurface(src);
DGA_AddBusySurface(dst);
UNLOCK_DISPLAY();
return(0);
}
Expand Down Expand Up @@ -902,15 +902,15 @@ static int DGA_LockHWSurface(_THIS, SDL_Surface *surface)
if ( surface == this->screen ) {
SDL_mutexP(hw_lock);
LOCK_DISPLAY();
if ( DGA_IsSurfaceDirty(surface) ) {
DGA_WaitDirtySurfaces(this);
if ( DGA_IsSurfaceBusy(surface) ) {
DGA_WaitBusySurfaces(this);
}
DGA_WaitFlip(this);
UNLOCK_DISPLAY();
} else {
if ( DGA_IsSurfaceDirty(surface) ) {
if ( DGA_IsSurfaceBusy(surface) ) {
LOCK_DISPLAY();
DGA_WaitDirtySurfaces(this);
DGA_WaitBusySurfaces(this);
UNLOCK_DISPLAY();
}
}
Expand All @@ -927,8 +927,8 @@ static int DGA_FlipHWSurface(_THIS, SDL_Surface *surface)
{
/* Wait for vertical retrace and then flip display */
LOCK_DISPLAY();
if ( DGA_IsSurfaceDirty(this->screen) ) {
DGA_WaitDirtySurfaces(this);
if ( DGA_IsSurfaceBusy(this->screen) ) {
DGA_WaitBusySurfaces(this);
}
DGA_WaitFlip(this);
XDGASetViewport(DGA_Display, DGA_Screen,
Expand Down
6 changes: 0 additions & 6 deletions src/video/dga/SDL_dgavideo.h
Expand Up @@ -58,12 +58,6 @@ typedef struct vidmem_bucket {
struct vidmem_bucket *next;
} vidmem_bucket;

/* Information about the location of the surface in hardware memory */
struct private_hwdata {
int x;
int y;
};

/* Private display data */
struct SDL_PrivateVideoData {
Display *DGA_Display;
Expand Down

0 comments on commit 0d9c8e2

Please sign in to comment.