[MPlayer-cvslog] r36390 - in trunk: gui/interface.c gui/interface.h gui/win32/interface.c mplayer.c

ib subversion at mplayerhq.hu
Thu Aug 1 19:45:31 CEST 2013


Author: ib
Date: Thu Aug  1 19:45:31 2013
New Revision: 36390

Log:
Remove GUI_HANDLE_EVENTS.

This call is only needed after a GUI_REDRAW, so add its code to
GUI_REDRAW and simplify the GUI interface.

Modified:
   trunk/gui/interface.c
   trunk/gui/interface.h
   trunk/gui/win32/interface.c
   trunk/mplayer.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Aug  1 19:36:21 2013	(r36389)
+++ trunk/gui/interface.c	Thu Aug  1 19:45:31 2013	(r36390)
@@ -332,7 +332,9 @@ int gui(int what, void *data)
         uiState();
         break;
 
-    case GUI_HANDLE_EVENTS:
+    case GUI_REDRAW:
+
+        uiEvent(ivRedraw, 0);
 
         if (!guiInfo.Playing || !guiInfo.VideoWindow)
             wsEvents();
@@ -735,11 +737,6 @@ int gui(int what, void *data)
 
         break;
 
-    case GUI_REDRAW:
-
-        uiEvent(ivRedraw, 0);
-        break;
-
     case GUI_SETUP_VIDEO_WINDOW:
 
         guiInfo.VideoWidth  = vo_dwidth;

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Thu Aug  1 19:36:21 2013	(r36389)
+++ trunk/gui/interface.h	Thu Aug  1 19:45:31 2013	(r36390)
@@ -40,7 +40,6 @@ extern int use_gui;             // this 
 /// gui() instructions
 enum {
     GUI_END_FILE,
-    GUI_HANDLE_EVENTS,
     GUI_HANDLE_X_EVENT,
     GUI_PREPARE,
     GUI_REDRAW,

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Thu Aug  1 19:36:21 2013	(r36389)
+++ trunk/gui/win32/interface.c	Thu Aug  1 19:45:31 2013	(r36390)
@@ -743,8 +743,6 @@ int gui(int what, void *data)
         }
         case GUI_RUN_MESSAGE:
           break;
-        case GUI_HANDLE_EVENTS:
-          break;
         case GUI_SET_MIXER:
         {
             if(audio_out)

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Thu Aug  1 19:36:21 2013	(r36389)
+++ trunk/mplayer.c	Thu Aug  1 19:45:31 2013	(r36390)
@@ -2565,7 +2565,6 @@ static void pause_loop(void)
 #ifdef CONFIG_GUI
         if (use_gui) {
             gui(GUI_REDRAW, 0);
-            gui(GUI_HANDLE_EVENTS, 0);
             if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos))
                 break;
         }
@@ -3096,7 +3095,6 @@ play_next_file:
             mp_cmd_t *cmd;
             usec_sleep(20000);
             gui(GUI_REDRAW, 0);
-            gui(GUI_HANDLE_EVENTS, 0);
             if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) {
                 if (cmd->id == MP_CMD_GUI)
                     gui(GUI_RUN_MESSAGE, cmd->args[0].v.s);
@@ -4009,7 +4007,6 @@ goto_enable_cache:
                 guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer);
                 gui(GUI_SET_MIXER, 0);
                 gui(GUI_REDRAW, 0);
-                gui(GUI_HANDLE_EVENTS, 0);
                 if (guiInfo.Playing == GUI_STOP)
                     break;                  // STOP
                 if (guiInfo.Playing == GUI_PAUSE)


More information about the MPlayer-cvslog mailing list