Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
On Windows the minimum window size may be larger than 80, so explicit…
Browse files Browse the repository at this point in the history
…ly request the expected rectangle.
  • Loading branch information
slouken committed Dec 7, 2009
1 parent 3e5f8f1 commit be589f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/automated/render/render.c
Expand Up @@ -56,11 +56,17 @@ static int render_testBlitBlend (void);
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;

Expand Down

0 comments on commit be589f4

Please sign in to comment.