diff src/video/directfb/SDL_DirectFB_render.c @ 2791:8133d1d278da

Date: Wed, 26 Nov 2008 19:50:31 +0100 From: Couriersud Subject: LPGL and closed-source license / Re: [Bug 607] Texture palette not up Permission granted to release code under both LPGL and closed-source commercial license. Please find attached a minor patch fixing vsync handling in the directfb driver and containing a small update to README.directfb
author Sam Lantinga <slouken@libsdl.org>
date Wed, 26 Nov 2008 21:59:35 +0000
parents 140a7edcf2bd
children 99210400e8b9
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c	Wed Nov 26 15:52:00 2008 +0000
+++ b/src/video/directfb/SDL_DirectFB_render.c	Wed Nov 26 21:59:35 2008 +0000
@@ -87,7 +87,8 @@
      "directfb",
      (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
       SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
-      SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
+      SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
+      SDL_RENDERER_ACCELERATED),
      (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
       SDL_TEXTUREMODULATE_ALPHA),
      (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
@@ -231,9 +232,10 @@
     data->flipflags = DSFLIP_PIPELINE | DSFLIP_BLIT;
 
     if (flags & SDL_RENDERER_PRESENTVSYNC) {
-        data->flipflags = DSFLIP_ONSYNC;
+        data->flipflags |= DSFLIP_WAITFORSYNC;
         renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
-    }
+    } else
+        data->flipflags |= DSFLIP_ONSYNC;
 
     SDL_DFB_CHECKERR(data->surface->GetCapabilities(data->surface, &scaps));
     if (scaps & DSCAPS_DOUBLE)
@@ -863,7 +865,7 @@
 
     /* Send the data to the display */
     SDL_DFB_CHECKERR(data->surface->
-                     Flip(data->surface, NULL, 0 * data->flipflags));
+                     Flip(data->surface, NULL, data->flipflags));
 
     return;
   error: