[SDL] how to know the surface is the screen or not?
jiangshan00000 at gmail.com
Mon Jul 18 01:08:08 PDT 2011
Yes, your code works well!
2011/7/18 Ryan C. Gordon <icculus at icculus.org>:
>> if ( (dest_surface is screen)&&(screen is NOT doube buffered))
> This is SDL 1.2, right?
> If you're writing an SDL 1.2 driver:
> if ( (surface == SDL_VideoSurface) &&
> (surface->flags & SDL_DOUBLEBUF) == 0) )
> SDL_VideoSurface (a macro) gets you the lowlevel SDL_Surface pointer that
> was provided by the driver during SDL_SetVideoMode().
> (If this were an external app using SDL, you'd use SDL_GetVideoSurface() to
> get the Public surface, which is either what the driver provided in
> SDL_SetVideoMode(), or a shadow surface SDL is using to convert between the
> application and the driver's needs.)
> In SDL 1.3, this works completely differently.
> SDL mailing list
> SDL at lists.libsdl.org
More information about the SDL