changeset 35757:b1d32b46514e

Get rid of uiVideoRender. Directly use guiInfo.Playing instead.
author ib
date Thu, 24 Jan 2013 16:06:48 +0000
parents 3919b6360e54
children 75724b59a3a8
files gui/interface.c gui/ui/ui.h gui/ui/video.c
diffstat 3 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Jan 24 15:59:24 2013 +0000
+++ b/gui/interface.c	Thu Jan 24 16:06:48 2013 +0000
@@ -229,8 +229,6 @@
 
     guiInfo.Playing = GUI_STOP;
 
-    uiVideoRender = True;
-
     playlist = listMgr(PLAYLIST_ITEM_GET_CURR, 0);
 
     if (playlist && !filename) {
@@ -268,7 +266,6 @@
 
         cfg_write();
 
-        uiVideoRender = False;
         uiMainRender  = False;
 
         // NOTE TO MYSELF: destroy the windows
@@ -874,7 +871,6 @@
             gui(GUI_SET_STATE, (void *)GUI_STOP);
 
             wsEvents();
-            uiVideoRender = True;
             wsWindowRedraw(&guiApp.videoWindow);
             wsMouseVisibility(&guiApp.videoWindow, wsShowMouseCursor);
         }
--- a/gui/ui/ui.h	Thu Jan 24 15:59:24 2013 +0000
+++ b/gui/ui/ui.h	Thu Jan 24 16:06:48 2013 +0000
@@ -19,7 +19,6 @@
 #ifndef MPLAYER_GUI_UI_H
 #define MPLAYER_GUI_UI_H
 
-extern int             uiVideoRender;
 extern int             uiMainRender;
 
 extern unsigned char * mainDrawBuffer;
--- a/gui/ui/video.c	Thu Jan 24 15:59:24 2013 +0000
+++ b/gui/ui/video.c	Thu Jan 24 16:06:48 2013 +0000
@@ -30,7 +30,6 @@
 #include "gui/interface.h"
 #include "gui/dialog/dialog.h"
 
-int             uiVideoRender = False;
 int             videoVisible = 0;
 
 void uiVideoDraw( void )
@@ -41,11 +40,10 @@
  if ( guiApp.videoWindow.State == wsWindowFocusOut && metacity_hack != 3 ) videoVisible--;
 
  if ( !guiApp.videoWindow.Mapped ||
-      guiApp.videoWindow.Visible == wsWindowNotVisible ) return;
+      guiApp.videoWindow.Visible == wsWindowNotVisible ||
+      guiInfo.Playing) return;
 
- if ( guiInfo.Playing ) uiVideoRender=False;
-
- if ( uiVideoRender && guiApp.videoWindow.State == wsWindowExpose )
+ if ( guiApp.videoWindow.State == wsWindowExpose )
   {
    wsWindowBackground(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
    if ( guiApp.video.Bitmap.Image ) wsImageDraw( &guiApp.videoWindow );