It works fine, but if I change the first line to:
//SDL_Rect *blah;
the program crashes with:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
It works fine, but if I change the first line to:
//SDL_Rect *blah;
the program crashes with:
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
The program below stop working when I set the X coordinates at something more
than 100. X coordinate 100 works, but not 101 !
My immage is 600 X 450 (W X H).
If I make the same test but with SDL_SetVideoMode(1024, 768, 0, 0), it works.
Is anyone have an idea of what can be the problem ?
? SDL_UpdateRect (screen, X, Y, X+src.w, Y+src.h);
should be
SDL_UpdateRect(screen,X,Y,dest.w,dest.h);
because SDL_UpdateRect does that addition for you internally. SDL_UpdateRect
won’t work if any of the rectangle is offscreen.
You can also change
SDL_BlitSurface (image, &src, screen, &dest);
to SDL_BlitSurface (image, NULL, screen, &dest);
then get rid of src entirely; SDL defaults to the entire source surface when
no area is given.
You should also call SDL_Quit() just before main returns, i.e. below
SDL_Delay(5000).On Sunday 08 May 2005 07:31, talie wrote: