[MPlayer-cvslog] r34214 - trunk/gui/win32/interface.c

ib subversion at mplayerhq.hu
Tue Oct 18 14:45:24 CEST 2011


Author: ib
Date: Tue Oct 18 14:45:24 2011
New Revision: 34214

Log:
Fix bug with option sub_window in the Win32 GUI.

Enabling this option didn't work so far.

Determine if we need a video window by using the same logic as in the
X11/GTK GUI, and hide the subwindow accordingly.

This also fixes the probably misunderstood use of GUI_SET_AUDIO in the
Win32 GUI.

Modified:
   trunk/gui/win32/interface.c

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Tue Oct 18 13:03:39 2011	(r34213)
+++ trunk/gui/win32/interface.c	Tue Oct 18 14:45:24 2011	(r34214)
@@ -502,6 +502,7 @@ int gui(int what, void *data)
             if(!mygui->playlist->tracks) return 0;
             uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE);
             guiInfo.Track = mygui->playlist->current + 1;
+            guiInfo.VideoWindow = 1;
             if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
             if(gtkAOExtraStereo)
             {
@@ -536,11 +537,8 @@ int gui(int what, void *data)
         }
         case GUI_SET_AUDIO:
         {
-            guiInfo.VideoWindow = (data && !guiInfo.sh_video);
-            // NOTE: This type doesn't mean (and never meant) that we have
-            // *just* audio, so there probably should be a check before
-            // hiding (see gui/interface.c).
-            if(IsWindowVisible(mygui->subwindow))
+            if (data && !guiInfo.sh_video) guiInfo.VideoWindow = 0;
+            if(IsWindowVisible(mygui->subwindow) && !guiInfo.VideoWindow)
                 ShowWindow(mygui->subwindow, SW_HIDE);
             break;
         }


More information about the MPlayer-cvslog mailing list