changeset 33820:4c888b1d8cac

Use struct initializer in one more case.
author reimar
date Sun, 24 Jul 2011 19:52:46 +0000
parents 6451d20ff7c1
children 240ab28c7628
files libvo/vo_directx.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directx.c	Sun Jul 24 19:43:47 2011 +0000
+++ b/libvo/vo_directx.c	Sun Jul 24 19:52:46 2011 +0000
@@ -368,7 +368,10 @@
 static uint32_t Directx_InitDirectDraw(void)
 {
     HRESULT (WINAPI *OurDirectDrawCreateEx)(GUID *, LPVOID *, REFIID, IUnknown FAR *);
-    DDSURFACEDESC2 ddsd;
+    DDSURFACEDESC2 ddsd = {
+        .dwSize  = sizeof(ddsd),
+        .dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT,
+    };
     LPDIRECTDRAWENUMERATEEX OurDirectDrawEnumerateEx;
 
     adapter_count = 0;
@@ -416,8 +419,6 @@
     }
 
     //get current screen siz for selected monitor ...
-    ddsd.dwSize  = sizeof(ddsd);
-    ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
     g_lpdd->lpVtbl->GetDisplayMode(g_lpdd, &ddsd);
     if (vo_screenwidth && vo_screenheight) {
         vm_height = vo_screenheight;