changeset 443:778b970cec12

Added temporarily disabled code for hardware acceleration in windowed mode.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 17 Aug 2002 19:36:43 +0000
parents b37ce4813ad4
children 406b12a17b15
files src/video/windx5/SDL_dx5video.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5video.c	Sat Aug 17 19:17:18 2002 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Sat Aug 17 19:36:43 2002 +0000
@@ -1368,7 +1368,15 @@
 			}
 		}
 		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 @@
 	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;