[SDL] Blitting Problem

Christian Walther cwalther at gmx.ch
Tue Jan 9 00:13:29 PST 2007


Kevin Macey wrote:
> I'm having trouble bliting a surface to the screen
> surface. it's telling me I'm passing an incorrect
> argument type, But the type is SDL_Rect.

Yup. The type you're passing is SDL_Rect. The type it's expecting is 
*SDL_Rect. Use SDL_BlitSurface(surf1, &rect1, surf2, &rect2), not 
SDL_BlitSurface(surf1, rect1, surf2, rect2), if rect1 and rect2 are 
SDL_Rects you made on the stack. (I also fall for this every time I use 
SDL_BlitSurface...)

  -Christian





More information about the SDL mailing list