Mercurial > sdl-ios-xcode
changeset 3531:61b7f5821576
On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 07 Dec 2009 08:01:20 +0000 |
parents | e96be66e3673 |
children | 101f94947013 |
files | test/automated/render/render.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test/automated/render/render.c Sun Dec 06 08:39:01 2009 +0000 +++ b/test/automated/render/render.c Mon Dec 07 08:01:20 2009 +0000 @@ -56,11 +56,17 @@ static int render_compare( const char *msg, const SurfaceImage_t *s, int allowable_error ) { int ret; + SDL_Rect rect; Uint8 pix[4*80*60]; SDL_Surface *testsur; /* Read pixels. */ - ret = SDL_RenderReadPixels( NULL, FORMAT, pix, 80*4 ); + /* Explicitly specify the rect in case the window isn't expected size... */ + rect.x = 0; + rect.y = 0; + rect.w = 80; + rect.h = 60; + ret = SDL_RenderReadPixels( &rect, FORMAT, pix, 80*4 ); if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) ) return 1;