We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 394

Summary: directfb driver: yuv overlay creation will allways fail
Product: SDL Reporter: couriersud
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 1.2.11   
Hardware: x86   
OS: Linux   
Attachments: patch to correct issues

Description couriersud 2007-02-20 13:15:08 UTC
Due to changes in directfb 0.9.24, 0.9.25 YUV overlay creation will allways fail due to the fact that the code will not set a directfb coordination level. The following diff fixes the problem and will enable the use of hardware accelerated overlays using sdl over directfb.

--- libsdl1.2-1.2.11.orig/src/video/directfb/SDL_DirectFB_yuv.c
+++ libsdl1.2-1.2.11/src/video/directfb/SDL_DirectFB_yuv.c
@@ -118,6 +118,14 @@
       break;
     }
 
+  ret = layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE );
+  if (ret) 
+    {
+       SetDirectFBError( "IDirectFBDisplayLayer::SetCooperativeLevel() failed",
 ret );
+       layer->Release( layer );
+       return ret;
+     }
+
   ret = layer->SetConfiguration (layer, &conf);
   if (ret)
     {
Comment 1 couriersud 2007-02-20 13:17:49 UTC
Created attachment 191 [details]
patch to correct issues
Comment 2 Ryan C. Gordon 2007-02-20 16:07:13 UTC
Fixed in svn revision #2986 for the 1.2 branch, and #2987 for the 1.3 branch.

Thanks!

--ryan.