[MPlayer-cvslog] r34179 - trunk/libvo/vo_directx.c

ib subversion at mplayerhq.hu
Thu Oct 6 12:04:40 CEST 2011


Author: ib
Date: Thu Oct  6 12:04:40 2011
New Revision: 34179

Log:
Fix DirectX compilation error.

In DirectX 8 and 9, member dwBackBufferCount is in an anonymous union.

MinGW complains:

  error: unknown field 'dwBackBufferCount' specified in initializer

Modified:
   trunk/libvo/vo_directx.c

Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c	Tue Oct  4 04:02:53 2011	(r34178)
+++ trunk/libvo/vo_directx.c	Thu Oct  6 12:04:40 2011	(r34179)
@@ -229,9 +229,9 @@ static uint32_t Directx_CreateOverlay(ui
         .dwFlags  = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_BACKBUFFERCOUNT | DDSD_PIXELFORMAT,
         .dwWidth  = image_width,
         .dwHeight = image_height,
-        .dwBackBufferCount = 2,
     };
     uint32_t i = 0;
+    ddsdOverlay.dwBackBufferCount = 2;
     while (i < NUM_FORMATS && imgfmt != g_ddpf[i].img_format)
         i++;
     if (!g_lpdd || !g_lpddsPrimary || i == NUM_FORMATS)
@@ -628,10 +628,10 @@ static uint32_t Directx_CheckOverlayPixe
         .dwFlags  = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT,
         .dwWidth  = 300,
         .dwHeight = 280,
-        .dwBackBufferCount = 0,
     };
     uint32_t i;
     uint32_t formatcount = 0;
+    ddsdOverlay.dwBackBufferCount = 0;
     //get driver caps to determine overlay support
     ddrval = g_lpdd->lpVtbl->GetCaps(g_lpdd, &capsDrv, NULL);
     if (FAILED(ddrval)) {


More information about the MPlayer-cvslog mailing list