# HG changeset patch # User faust3 # Date 1065720496 0 # Node ID 3cf2c7f8d9a9418be7302c67812dec2d1218c118 # Parent 052938db5a13d070c043571d0ab778d3ff9ece45 yet another hack to prevent crashes with dr diff -r 052938db5a13 -r 3cf2c7f8d9a9 libvo/vo_directx.c --- a/libvo/vo_directx.c Thu Oct 09 15:08:13 2003 +0000 +++ b/libvo/vo_directx.c Thu Oct 09 17:28:16 2003 +0000 @@ -59,6 +59,7 @@ extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); extern int vo_doublebuffering; //tribblebuffering extern int vo_fs; +extern int vo_directrendering; /***************************************************************************** * DirectDraw GUIDs. @@ -936,6 +937,10 @@ g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx); } g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL); + if(vo_directrendering && (dstride != ddsdsf.lPitch)){ + mp_msg(MSGT_VO,MSGL_WARN,"stride changed !!!! disabling direct rendering\n"); + vo_directrendering=0; + } dstride = ddsdsf.lPitch; image = ddsdsf.lpSurface; }