# HG changeset patch # User zuxy # Date 1193488646 0 # Node ID b6d6af21c2ee77e51a76e92595e0abc6a2afdf9f # Parent a8ef08f502c048c559d05a75eaae5993322db055 Cosmetic fix for r24861 diff -r a8ef08f502c0 -r b6d6af21c2ee libvo/vo_directx.c --- a/libvo/vo_directx.c Sat Oct 27 12:33:56 2007 +0000 +++ b/libvo/vo_directx.c Sat Oct 27 12:37:26 2007 +0000 @@ -1176,15 +1176,15 @@ 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) { - if(vo_directrendering && (dstride != ddsdsf.lPitch)){ - mp_msg(MSGT_VO,MSGL_WARN,"stride changed !!!! disabling direct rendering\n"); - vo_directrendering=0; - } - if (tmp_image) - free(tmp_image); - tmp_image = NULL; - dstride = ddsdsf.lPitch; - image = ddsdsf.lpSurface; + if(vo_directrendering && (dstride != ddsdsf.lPitch)){ + mp_msg(MSGT_VO,MSGL_WARN,"stride changed !!!! disabling direct rendering\n"); + vo_directrendering=0; + } + if (tmp_image) + free(tmp_image); + tmp_image = NULL; + dstride = ddsdsf.lPitch; + image = ddsdsf.lpSurface; } else if (!tmp_image) { mp_msg(MSGT_VO, MSGL_WARN, "Locking the surface failed, rendering to a hidden surface!\n"); tmp_image = image = calloc(1, image_height * dstride * 2); @@ -1391,9 +1391,9 @@ memset(&ddsdsf, 0,sizeof(DDSURFACEDESC2)); ddsdsf.dwSize = sizeof (DDSURFACEDESC2); if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) { - dstride = ddsdsf.lPitch; - image = ddsdsf.lpSurface; - return 0; + dstride = ddsdsf.lPitch; + image = ddsdsf.lpSurface; + return 0; } mp_msg(MSGT_VO, MSGL_V, "Initial Lock on the Surface failed.\n"); return 1;