comparison src/video/windx5/SDL_dx5video.c @ 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 323c766f5a46
comparison
equal deleted inserted replaced
442:b37ce4813ad4 443:778b970cec12
1366 SDL_OutOfMemory(); 1366 SDL_OutOfMemory();
1367 return(NULL); 1367 return(NULL);
1368 } 1368 }
1369 } 1369 }
1370 dd_surface3 = NULL; 1370 dd_surface3 = NULL;
1371 #if 0 /* FIXME: enable this when SDL consistently reports lost surfaces */
1372 if ( (flags & SDL_HWSURFACE) == SDL_HWSURFACE ) {
1373 video->flags |= SDL_HWSURFACE;
1374 } else {
1375 video->flags |= SDL_SWSURFACE;
1376 }
1377 #else
1371 video->flags |= SDL_SWSURFACE; 1378 video->flags |= SDL_SWSURFACE;
1379 #endif
1372 if ( (flags & SDL_RESIZABLE) && !(flags & SDL_NOFRAME) ) { 1380 if ( (flags & SDL_RESIZABLE) && !(flags & SDL_NOFRAME) ) {
1373 video->flags |= SDL_RESIZABLE; 1381 video->flags |= SDL_RESIZABLE;
1374 } 1382 }
1375 if ( flags & SDL_NOFRAME ) { 1383 if ( flags & SDL_NOFRAME ) {
1376 video->flags |= SDL_NOFRAME; 1384 video->flags |= SDL_NOFRAME;
1585 1593
1586 /* Make sure the surface format was set properly */ 1594 /* Make sure the surface format was set properly */
1587 memset(&ddsd, 0, sizeof(ddsd)); 1595 memset(&ddsd, 0, sizeof(ddsd));
1588 ddsd.dwSize = sizeof(ddsd); 1596 ddsd.dwSize = sizeof(ddsd);
1589 result = IDirectDrawSurface3_Lock(dd_surface3, NULL, 1597 result = IDirectDrawSurface3_Lock(dd_surface3, NULL,
1590 &ddsd, DDLOCK_NOSYSLOCK, NULL); 1598 &ddsd, (DDLOCK_NOSYSLOCK|DDLOCK_WAIT), NULL);
1591 if ( result != DD_OK ) { 1599 if ( result != DD_OK ) {
1592 SetDDerror("DirectDrawSurface3::Lock", result); 1600 SetDDerror("DirectDrawSurface3::Lock", result);
1593 goto error_end; 1601 goto error_end;
1594 } 1602 }
1595 IDirectDrawSurface3_Unlock(dd_surface3, NULL); 1603 IDirectDrawSurface3_Unlock(dd_surface3, NULL);