# HG changeset patch # User reimar # Date 1311536445 0 # Node ID fc9fbb0b31fac9a257b3349648eb8eea5a8ddaac # Parent a3d73bc21e553a060acccd213a9b8ecd56a6b8d1 Simplify some more struct initializations. diff -r a3d73bc21e55 -r fc9fbb0b31fa libvo/vo_directx.c --- a/libvo/vo_directx.c Sun Jul 24 19:36:11 2011 +0000 +++ b/libvo/vo_directx.c Sun Jul 24 19:40:45 2011 +0000 @@ -714,14 +714,12 @@ { int i; uint32_t formatcount = 0; - DDPIXELFORMAT ddpf; + DDPIXELFORMAT ddpf = { .dwSize = sizeof(ddpf) }; DDSURFACEDESC2 ddsd; HDC hdc; HRESULT hres; COLORREF rgbT = RGB(0, 0, 0); mp_msg(MSGT_VO, MSGL_V, "checking primary surface\n"); - memset(&ddpf, 0, sizeof(DDPIXELFORMAT)); - ddpf.dwSize = sizeof(DDPIXELFORMAT); //we have to create a primary surface first if (Directx_CreatePrimarySurface() != 0) return 1; @@ -858,11 +856,11 @@ mp_msg(MSGT_VO, MSGL_ERR, "can't flip page\n"); } if (nooverlay) { - DDBLTFX ddbltfx; // ask for the "NOTEARING" option - memset(&ddbltfx, 0, sizeof(DDBLTFX)); - ddbltfx.dwSize = sizeof(DDBLTFX); - ddbltfx.dwDDFX = DDBLTFX_NOTEARING; + DDBLTFX ddbltfx = { + .dwSize = sizeof(ddbltfx), + .dwDDFX = DDBLTFX_NOTEARING, + }; g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx); } if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack, NULL, &ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) {