# HG changeset patch # User Mike Gorchak # Date 1258700861 0 # Node ID 6265b67848e0ae38edda4906b46ad38e41ecbe5e # Parent 87182c69e08020b6db62fea71c3769c667c86f7b RenderReadPixels and RenderWritePixels now work properly. diff -r 87182c69e080 -r 6265b67848e0 src/video/photon/SDL_photon_render.c --- a/src/video/photon/SDL_photon_render.c Fri Nov 20 07:06:50 2009 +0000 +++ b/src/video/photon/SDL_photon_render.c Fri Nov 20 07:07:41 2009 +0000 @@ -165,6 +165,8 @@ renderer->RenderLine = photon_renderline; renderer->RenderFill = photon_renderfill; renderer->RenderCopy = photon_rendercopy; + renderer->RenderReadPixels = photon_renderreadpixels; + renderer->RenderWritePixels = photon_renderwritepixels; renderer->RenderPresent = photon_renderpresent; renderer->DestroyTexture = photon_destroytexture; renderer->DestroyRenderer = photon_destroyrenderer; @@ -321,6 +323,10 @@ /* Create offscreen surfaces */ allocate_task=SDL_PHOTON_SURFTYPE_OFFSCREEN; + /* Before destroying surfaces, be sure, that rendering was completed */ + PgFlush(); + PgWaitHWIdle(); + /* Destroy current surfaces */ for (it=0; itdriverdata; uint32_t it; + /* Before destroying the renderer, be sure, that rendering was completed */ + PgFlush(); + PgWaitHWIdle(); + /* Destroy graphics context */ if (rdata->gc!=NULL) {