[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!
thanks!


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.
>
> --ryan.
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



-- 
Best wishes,
Jiangshan



More information about the SDL mailing list