[MPlayer-cvslog] r33895 - trunk/libvo/vo_directx.c

reimar subversion at mplayerhq.hu
Sun Jul 24 19:23:49 CEST 2011


Author: reimar
Date: Sun Jul 24 19:23:49 2011
New Revision: 33895

Log:
Simplify code handling minimized state.

Modified:
   trunk/libvo/vo_directx.c

Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c	Sun Jul 24 19:16:43 2011	(r33894)
+++ trunk/libvo/vo_directx.c	Sun Jul 24 19:23:49 2011	(r33895)
@@ -488,17 +488,20 @@ static uint32_t Directx_ManageDisplay(vo
     rd.right=rd.left+width;
     rd.bottom=rd.top+height;
 
-      if(!nooverlay && (!width || !height)){
-	    /*window is minimized*/
-	    ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay,NULL, g_lpddsPrimary, NULL, DDOVER_HIDE, NULL);
-	    return 0;
-	  }
-
 	/*ok, let's workaround some overlay limitations*/
 	if(!nooverlay)
 	{
 		uint32_t        uStretchFactor1000;  //minimum stretch
         uint32_t        xstretch1000,ystretch1000;
+
+        if (!width || !height) {
+            // window is minimized, so we should hide the overlay in case
+            // colorkeying is not used or working.
+            // In addition trying to set width/height to 0 would crash
+            g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, NULL, g_lpddsPrimary, NULL, DDOVER_HIDE, NULL);
+            return 0;
+        }
+
 		/*get driver capabilities*/
         ZeroMemory(&capsDrv, sizeof(capsDrv));
         capsDrv.dwSize = sizeof(capsDrv);


More information about the MPlayer-cvslog mailing list