Merged r2985:2986 from branches/SDL-1.2: directfb yuv coop level fix.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 20 Feb 2007 21:08:00 +0000
changeset 2094 7ba4a732e3d0
parent 2093 cdaeb26ed66a
child 2095 1d9cd8266e22
Merged r2985:2986 from branches/SDL-1.2: directfb yuv coop level fix.
src/video/directfb/SDL_DirectFB_yuv.c
--- a/src/video/directfb/SDL_DirectFB_yuv.c	Thu Feb 15 23:57:07 2007 +0000
+++ b/src/video/directfb/SDL_DirectFB_yuv.c	Tue Feb 20 21:08:00 2007 +0000
@@ -116,6 +116,14 @@
         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) {
         SetDirectFBerror("IDirectFBDisplayLayer::SetConfiguration", ret);