[MPlayer-cvslog] r33353 - in trunk/gui: app.c app.h interface.c

ib subversion at mplayerhq.hu
Tue May 3 15:42:00 CEST 2011


Author: ib
Date: Tue May  3 15:42:00 2011
New Revision: 33353

Log:
Initialize appMPlayer differently.

Perform a direct initialization instead of doing it by a function call.

Modified:
   trunk/gui/app.c
   trunk/gui/app.h
   trunk/gui/interface.c

Modified: trunk/gui/app.c
==============================================================================
--- trunk/gui/app.c	Tue May  3 15:19:39 2011	(r33352)
+++ trunk/gui/app.c	Tue May  3 15:42:00 2011	(r33353)
@@ -23,7 +23,15 @@
 
 #include "libavutil/common.h"
 
-guiItems appMPlayer;
+guiItems appMPlayer = {
+    { 0 }, { 0 }, 0,
+    { 0 }, { 0 },
+    { 0 }, { 0 }, 0,
+    { 0 }, { 0 }, { 0 }, 0,
+    -1,    { 0 },
+    -1,    { 0 },
+    -1,    { 0 }
+};
 
 static const evName evNames[] = {
     { evNone,              "evNone"              },
@@ -84,13 +92,6 @@ static void appClearItem(wItem *item)
     memset(item, 0, sizeof(*item));
 }
 
-void appInitStruct(void)
-{
-    appMPlayer.IndexOfMainItems = -1;
-    appMPlayer.IndexOfBarItems  = -1;
-    appMPlayer.IndexOfMenuItems = -1;
-}
-
 void appFreeStruct(void)
 {
     int i;
@@ -114,7 +115,10 @@ void appFreeStruct(void)
     for (i = 0; i <= appMPlayer.IndexOfMenuItems; i++)
         appClearItem(&appMPlayer.menuItems[i]);
 
-    appInitStruct();
+    appMPlayer.IndexOfMainItems = -1;
+    appMPlayer.IndexOfBarItems  = -1;
+    appMPlayer.IndexOfMenuItems = -1;
+
     fntFreeFont();
 }
 

Modified: trunk/gui/app.h
==============================================================================
--- trunk/gui/app.h	Tue May  3 15:19:39 2011	(r33352)
+++ trunk/gui/app.h	Tue May  3 15:42:00 2011	(r33353)
@@ -194,7 +194,6 @@ extern guiItems appMPlayer;
 
 int appFindMessage(unsigned char *str);
 void appFreeStruct(void);
-void appInitStruct(void);
 void btnModify(int event, float state);
 void btnSet(int event, int set);
 

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue May  3 15:19:39 2011	(r33352)
+++ trunk/gui/interface.c	Tue May  3 15:42:00 2011	(r33353)
@@ -169,8 +169,6 @@ void guiInit(void)
     guiIntfStruct.Balance    = 50.0f;
     guiIntfStruct.StreamType = -1;
 
-    appInitStruct();
-
     memset(&gtkEquChannels, 0, sizeof(gtkEquChannels));
 
 #ifdef CONFIG_DXR3


More information about the MPlayer-cvslog mailing list