# HG changeset patch # User Sam Lantinga # Date 1258272067 0 # Node ID 116f74112e8af06976537a622f93767467206b24 # Parent c8fbb27627d90a8c5ba179591cd180c5bb4770a2 Work in progress: SDL_RenderReadPixels() should be implemented soon. diff -r c8fbb27627d9 -r 116f74112e8a test/automated/render/render.c --- a/test/automated/render/render.c Sun Nov 15 04:58:03 2009 +0000 +++ b/test/automated/render/render.c Sun Nov 15 08:01:07 2009 +0000 @@ -67,26 +67,9 @@ return 1; /* Read pixels. */ -#if 0 ret = SDL_RenderReadPixels( NULL, pix, 80*4 ); if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) ) return 1; -#else - int i, j; - Uint8 *buf = pix; - const Uint8 *read_pix; - Uint8 *write_pix; - for (j=0; jheight; j++) { - for (i=0; iwidth; i++) { - read_pix = &s->pixel_data[ (j*80 + i) * s->bytes_per_pixel ]; - write_pix = &buf[ (j*80 + i) * 4 ]; - write_pix[0] = read_pix[0]; - write_pix[1] = read_pix[1]; - write_pix[2] = read_pix[2]; - write_pix[3] = SDL_ALPHA_OPAQUE; - } - } -#endif /* Create surface. */ testsur = SDL_CreateRGBSurfaceFrom( pix, 80, 60, 32, 80*4,