Need to set DLSCL_ADMINISTRATIVE coop level in directfb driver, or YUV overlay SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Tue, 20 Feb 2007 21:05:12 +0000
branchSDL-1.2
changeset 3920 e5a65c16913b
parent 3919 d13618a935a2
child 3921 746aa4852f87
Need to set DLSCL_ADMINISTRATIVE coop level in directfb driver, or YUV overlay creation will fail in newer DirectFB versions. Fixes Bugzilla #394.
src/video/directfb/SDL_DirectFB_yuv.c
--- a/src/video/directfb/SDL_DirectFB_yuv.c	Fri Feb 16 04:56:17 2007 +0000
+++ b/src/video/directfb/SDL_DirectFB_yuv.c	Tue Feb 20 21:05:12 2007 +0000
@@ -118,6 +118,15 @@
       break;
     }
 
+  /* Need to set coop level or newer DirectFB versions will fail here. */
+  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)
     {