I’m writing a fbcon hardware accel driver.
I’d like to do something in FillHWRect like this:
HWAccelBlit
{
if ( (dest_surface is screen) &&(screen is NOT doube buffered))
{
wait vsync
}
blit here
}
Does any one know how to do this?
thanks!–
Best wishes,
Jiangshan
http://www.libsdl.org/cgi/docwiki.cgi/SDL_GetVideoSurface

Compare that pointer to the dest surface pointer
-OzOn Sun, Jul 17, 2011 at 10:13 PM, ??? wrote:
I’m writing a fbcon hardware accel driver.
I’d like to do something in FillHWRect like this:
HWAccelBlit
{
? ?if ( (dest_surface is screen) &&(screen is NOT doube buffered))
? {
? ? ?wait vsync
? }
? blit here
}
Does any one know how to do this?
thanks!
–
Best wishes,
Jiangshan
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.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.
Yes, your code works well!
thanks!
2011/7/18 Ryan C. Gordon :>
? ? 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