Mercurial > mplayer.hg
changeset 33679:2d3199623440
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.
author | ib |
---|---|
date | Wed, 29 Jun 2011 09:12:03 +0000 |
parents | 02cc94c80367 |
children | 9fde6b9e0cc1 |
files | gui/interface.c gui/win32/interface.c |
diffstat | 2 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Tue Jun 28 23:45:05 2011 +0000 +++ b/gui/interface.c Wed Jun 29 09:12:03 2011 +0000 @@ -592,12 +592,10 @@ 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:
--- a/gui/win32/interface.c Tue Jun 28 23:45:05 2011 +0000 +++ b/gui/win32/interface.c Wed Jun 29 09:12:03 2011 +0000 @@ -582,6 +582,7 @@ } 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 @@ 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 */