# HG changeset patch # User ib # Date 1317895480 0 # Node ID 954f6d0443715090eea25255d4cf797667e66cc5 # Parent de2fbf5e5a4e394b8c802bfe41224c2e399091db 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 diff -r de2fbf5e5a4e -r 954f6d044371 libvo/vo_directx.c --- a/libvo/vo_directx.c Tue Oct 04 02:02:53 2011 +0000 +++ b/libvo/vo_directx.c Thu Oct 06 10:04:40 2011 +0000 @@ -229,9 +229,9 @@ .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 @@ .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)) {