mirror of
https://github.com/yawut/SDL.git
synced 2026-04-21 16:17:28 -05:00
On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle.
This commit is contained in:
parent
3e60082b3f
commit
4969fa9624
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user