Mercurial > sdl-ios-xcode
diff src/video/fbcon/SDL_fb3dfx.c @ 106:63ec24e0575f
Merged DGA video surface handling improvements, unified locking code.
Fixed matrox blit bug where src Y less than dst Y
Fixed hardware surface init when no resolution change
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Fri, 13 Jul 2001 10:19:51 +0000 |
parents | 74212992fb08 |
children | 5a9c36a45db1 |
line wrap: on
line diff
--- a/src/video/fbcon/SDL_fb3dfx.c Fri Jul 13 10:15:52 2001 +0000 +++ b/src/video/fbcon/SDL_fb3dfx.c Fri Jul 13 10:19:51 2001 +0000 @@ -32,18 +32,6 @@ #include "3dfx_mmio.h" -static int LockHWSurface(_THIS, SDL_Surface *surface) -{ - if ( surface == SDL_VideoSurface ) { - tdfx_waitidle(); - } - return(0); -} -static void UnlockHWSurface(_THIS, SDL_Surface *surface) -{ - return; -} - /* Wait for vertical retrace */ static void WaitVBL(_THIS) { @@ -55,6 +43,10 @@ while( (tdfx_in32(TDFX_STATUS) & STATUS_RETRACE) == 0 ) ; } +static void WaitIdle(_THIS) +{ + tdfx_waitidle(); +} /* Sets video mem colorkey and accelerated blit function */ static int SetHWColorKey(_THIS, SDL_Surface *surface, Uint32 key) @@ -86,6 +78,9 @@ tdfx_out32(COMMAND_2D, COMMAND_2D_FILLRECT); tdfx_out32(DSTSIZE, rect->w | (rect->h << 16)); tdfx_out32(LAUNCH_2D, dstX | (dstY << 16)); + + FB_AddBusySurface(dst); + return(0); } @@ -151,6 +146,9 @@ tdfx_out32(DSTXY, dstX | (dstY << 16)); tdfx_out32(LAUNCH_2D, srcX | (srcY << 16)); + FB_AddBusySurface(src); + FB_AddBusySurface(dst); + return(0); } @@ -185,9 +183,8 @@ { /* We have hardware accelerated surface functions */ this->CheckHWBlit = CheckHWBlit; - this->LockHWSurface = LockHWSurface; - this->UnlockHWSurface = UnlockHWSurface; wait_vbl = WaitVBL; + wait_idle = WaitIdle; /* Reset the 3Dfx controller */ tdfx_out32(BRESERROR0, 0);