[MPlayer-cvslog] r37192 - in trunk/gui: interface.c win32/interface.c
ib
subversion at mplayerhq.hu
Thu May 8 11:15:33 CEST 2014
Author: ib
Date: Thu May 8 11:15:32 2014
New Revision: 37192
Log:
Simplify code.
Move !guiInfo.sh_video condition to existing if (sh_audio) statement.
Modified:
trunk/gui/interface.c
trunk/gui/win32/interface.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed May 7 16:16:02 2014 (r37191)
+++ trunk/gui/interface.c Thu May 8 11:15:32 2014 (r37192)
@@ -812,6 +812,12 @@ int gui(int what, void *data)
if (sh_audio) {
guiInfo.AudioChannels = sh_audio->channels;
guiInfo.AudioPassthrough = (gstrcmp(sh_audio->ad_driver->info->short_name, "hwac3") == 0);
+
+ if (!guiInfo.sh_video) {
+ guiInfo.VideoWindow = False;
+ guiInfo.VideoWidth = 0;
+ guiInfo.VideoHeight = 0;
+ }
} else {
guiInfo.AudioChannels = 0;
guiInfo.AudioPassthrough = False;
@@ -822,12 +828,6 @@ int gui(int what, void *data)
if (guiInfo.AudioChannels < 2 || guiInfo.AudioPassthrough)
btnSet(evSetBalance, btnDisabled);
- if (sh_audio && !guiInfo.sh_video) {
- guiInfo.VideoWindow = False;
- guiInfo.VideoWidth = 0;
- guiInfo.VideoHeight = 0;
- }
-
if (last_balance < 0.0f) {
uiEvent(ivSetVolume, guiInfo.Volume);
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Wed May 7 16:16:02 2014 (r37191)
+++ trunk/gui/win32/interface.c Thu May 8 11:15:32 2014 (r37192)
@@ -628,13 +628,14 @@ int gui(int what, void *data)
{
guiInfo.AudioChannels = sh_audio->channels;
guiInfo.AudioPassthrough = (gstrcmp(sh_audio->ad_driver->info->short_name, "hwac3") == 0);
+
+ if (!guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
}
else
{
guiInfo.AudioChannels = 0;
guiInfo.AudioPassthrough = FALSE;
}
- if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)
ShowWindow(mygui->videowindow, SW_HIDE);
break;
More information about the MPlayer-cvslog
mailing list