From 949858c7de9c080e904be78bfddc3fbebbc6fd4e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 17 Aug 2002 19:36:43 +0000 Subject: [PATCH] Added temporarily disabled code for hardware acceleration in windowed mode. --- src/video/windx5/SDL_dx5video.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/video/windx5/SDL_dx5video.c b/src/video/windx5/SDL_dx5video.c index 8220edb48..1c3cb4d6a 100644 --- a/src/video/windx5/SDL_dx5video.c +++ b/src/video/windx5/SDL_dx5video.c @@ -1368,7 +1368,15 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current, } } dd_surface3 = NULL; +#if 0 /* FIXME: enable this when SDL consistently reports lost surfaces */ + if ( (flags & SDL_HWSURFACE) == SDL_HWSURFACE ) { + video->flags |= SDL_HWSURFACE; + } else { + video->flags |= SDL_SWSURFACE; + } +#else video->flags |= SDL_SWSURFACE; +#endif if ( (flags & SDL_RESIZABLE) && !(flags & SDL_NOFRAME) ) { video->flags |= SDL_RESIZABLE; } @@ -1587,7 +1595,7 @@ static int DX5_AllocDDSurface(_THIS, SDL_Surface *surface, memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); result = IDirectDrawSurface3_Lock(dd_surface3, NULL, - &ddsd, DDLOCK_NOSYSLOCK, NULL); + &ddsd, (DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL); if ( result != DD_OK ) { SetDDerror("DirectDrawSurface3::Lock", result); goto error_end;