diff src/video/windx5/SDL_dx5video.c @ 296:fab1ddc4d7bf

Removed the API changes to preserve SDL 1.2 stability
author Sam Lantinga <slouken@libsdl.org>
date Wed, 06 Mar 2002 11:05:47 +0000
parents eadc0746dfaf
children f6ffac90895c
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5video.c	Wed Mar 06 05:37:21 2002 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Wed Mar 06 11:05:47 2002 +0000
@@ -421,7 +421,6 @@
 static int DX5_SetHWColorKey(_THIS, SDL_Surface *surface, Uint32 key);
 static int DX5_SetHWAlpha(_THIS, SDL_Surface *surface, Uint8 alpha);
 static int DX5_LockHWSurface(_THIS, SDL_Surface *surface);
-static int DX5_LockHWSurfaceRect(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch);
 static void DX5_UnlockHWSurface(_THIS, SDL_Surface *surface);
 static int DX5_FlipHWSurface(_THIS, SDL_Surface *surface);
 static void DX5_FreeHWSurface(_THIS, SDL_Surface *surface);
@@ -592,9 +591,7 @@
 	device->SetHWColorKey = DX5_SetHWColorKey;
 	device->SetHWAlpha = DX5_SetHWAlpha;
 	device->LockHWSurface = DX5_LockHWSurface;
-	device->LockHWSurfaceRect = DX5_LockHWSurfaceRect;
 	device->UnlockHWSurface = DX5_UnlockHWSurface;
-	device->UnlockHWSurfaceRect = DX5_UnlockHWSurface;
 	device->FlipHWSurface = DX5_FlipHWSurface;
 	device->FreeHWSurface = DX5_FreeHWSurface;
 #ifdef IID_IDirectDrawGammaControl
@@ -1913,43 +1910,6 @@
 	surface->pixels = ddsd.lpSurface;
 	return(0);
 }
-static int DX5_LockHWSurfaceRect(_THIS, SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch)
-{
-	HRESULT result;
-	LPDIRECTDRAWSURFACE3 dd_surface;
-	DDSURFACEDESC ddsd;
-	RECT ddrect;
-
-	/* Calculate the lock rectangle */
-	ddrect.top    = rect->y;
-	ddrect.bottom = rect->y+rect->h;
-	ddrect.left   = rect->x;
-	ddrect.right  = rect->x+rect->w;
-
-	/* Lock and load! */
-	dd_surface = surface->hwdata->dd_writebuf;
-	memset(&ddsd, 0, sizeof(ddsd));
-	ddsd.dwSize = sizeof(ddsd);
-	result = IDirectDrawSurface3_Lock(dd_surface, &ddrect, &ddsd,
-					(DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL);
-	if ( result == DDERR_SURFACELOST ) {
-		result = IDirectDrawSurface3_Restore(
-						surface->hwdata->dd_surface);
-		result = IDirectDrawSurface3_Lock(dd_surface, &ddrect, &ddsd, 
-					(DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL);
-	}
-	if ( result != DD_OK ) {
-		SetDDerror("DirectDrawSurface3::Lock", result);
-		return(-1);
-	}
-	*pixels = ddsd.lpSurface;
-#if defined(NONAMELESSUNION)
-	*pitch = ddsd.u1.lPitch;
-#else
-	*pitch = (Uint16)ddsd.lPitch;
-#endif
-	return(0);
-}
 
 static void DX5_UnlockHWSurface(_THIS, SDL_Surface *surface)
 {