[MPlayer-cvslog] r33767 - in trunk/gui: interface.c win32/interface.c
ib
subversion at mplayerhq.hu
Wed Jun 29 11:12:04 CEST 2011
Author: ib
Date: Wed Jun 29 11:12:03 2011
New Revision: 33767
Log:
Simplify code of guiGetEvent type guiSetAudio.
Additionally, set guiInfo.MovieWindow in the Win32GUI the same way
to replace the former guiInfo.AudioOnly. This fixes compilation of the
Win32 GUI after r33749, reported by Stephen Sheldon, sfsheldo gmail com.
Modified:
trunk/gui/interface.c
trunk/gui/win32/interface.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Jun 29 01:45:05 2011 (r33766)
+++ trunk/gui/interface.c Wed Jun 29 11:12:03 2011 (r33767)
@@ -592,12 +592,10 @@ int guiGetEvent(int type, void *arg)
guiInfo.AudioChannels = arg ? ((sh_audio_t *)arg)->channels : 0;
- if (!guiInfo.MovieWindow || (arg && !guiInfo.sh_video)) {
+ if (arg && !guiInfo.sh_video)
guiInfo.MovieWindow = False;
- wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
- } else
- wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
+ wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow));
break;
case guiSetContext:
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Wed Jun 29 01:45:05 2011 (r33766)
+++ trunk/gui/win32/interface.c Wed Jun 29 11:12:03 2011 (r33767)
@@ -582,6 +582,7 @@ int guiGetEvent(int type, void *arg)
}
case guiSetAudio:
{
+ guiInfo.MovieWindow = (arg && !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).
@@ -855,13 +856,13 @@ static int update_subwindow(void)
ShowWindow(mygui->subwindow, SW_HIDE);
return 0;
}
- else if(guiInfo.AudioOnly)
+ else if(!guiInfo.MovieWindow)
return 0;
else ShowWindow(mygui->subwindow, SW_SHOW);
}
/* we've come out of fullscreen at the end of file */
- if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && !guiInfo.AudioOnly)
+ if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.MovieWindow)
ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
/* get our current window coordinates */
More information about the MPlayer-cvslog
mailing list