comparison test/automated/render/render.c @ 3441:5271ce790fed

Debug info to help track down render test failures
author Sam Lantinga <slouken@libsdl.org>
date Tue, 17 Nov 2009 06:51:14 +0000
parents 9f62f47d989b
children 204609180482
comparison
equal deleted inserted replaced
3440:e9502d56ae94 3441:5271ce790fed
65 pix = malloc( 4*80*60 ); 65 pix = malloc( 4*80*60 );
66 if (SDL_ATassert( "malloc", pix!=NULL )) 66 if (SDL_ATassert( "malloc", pix!=NULL ))
67 return 1; 67 return 1;
68 68
69 /* Read pixels. */ 69 /* Read pixels. */
70 SDL_RenderPresent();
70 ret = SDL_RenderReadPixels( NULL, FORMAT, pix, 80*4 ); 71 ret = SDL_RenderReadPixels( NULL, FORMAT, pix, 80*4 );
71 if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) ) 72 if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) )
72 return 1; 73 return 1;
73 74
74 /* Create surface. */ 75 /* Create surface. */
1010 str = SDL_GetCurrentVideoDriver(); 1011 str = SDL_GetCurrentVideoDriver();
1011 if (SDL_ATassert( "SDL_GetCurrentVideoDriver", strcmp(driver,str)==0)) 1012 if (SDL_ATassert( "SDL_GetCurrentVideoDriver", strcmp(driver,str)==0))
1012 goto err; 1013 goto err;
1013 /* Create window. */ 1014 /* Create window. */
1014 wid = SDL_CreateWindow( msg, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1015 wid = SDL_CreateWindow( msg, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
1015 80, 60, 0 ); 1016 80, 60, SDL_WINDOW_SHOWN );
1016 if (SDL_ATassert( "SDL_CreateWindow", wid!=0 )) 1017 if (SDL_ATassert( "SDL_CreateWindow", wid!=0 ))
1017 goto err; 1018 goto err;
1018 /* Check title. */ 1019 /* Check title. */
1019 str = SDL_GetWindowTitle( wid ); 1020 str = SDL_GetWindowTitle( wid );
1020 if (SDL_ATassert( "SDL_GetWindowTitle", strcmp(msg,str)==0)) 1021 if (SDL_ATassert( "SDL_GetWindowTitle", strcmp(msg,str)==0))