# HG changeset patch # User ib # Date 1304430120 0 # Node ID de4f5f183ddbecb19d2ea686ce8773297e990731 # Parent 62c0471bcf8c179f36fac40a627e8a489e3e951e Initialize appMPlayer differently. Perform a direct initialization instead of doing it by a function call. diff -r 62c0471bcf8c -r de4f5f183ddb gui/app.c --- a/gui/app.c Tue May 03 13:19:39 2011 +0000 +++ b/gui/app.c Tue May 03 13:42:00 2011 +0000 @@ -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 @@ 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 @@ for (i = 0; i <= appMPlayer.IndexOfMenuItems; i++) appClearItem(&appMPlayer.menuItems[i]); - appInitStruct(); + appMPlayer.IndexOfMainItems = -1; + appMPlayer.IndexOfBarItems = -1; + appMPlayer.IndexOfMenuItems = -1; + fntFreeFont(); } diff -r 62c0471bcf8c -r de4f5f183ddb gui/app.h --- a/gui/app.h Tue May 03 13:19:39 2011 +0000 +++ b/gui/app.h Tue May 03 13:42:00 2011 +0000 @@ -194,7 +194,6 @@ int appFindMessage(unsigned char *str); void appFreeStruct(void); -void appInitStruct(void); void btnModify(int event, float state); void btnSet(int event, int set); diff -r 62c0471bcf8c -r de4f5f183ddb gui/interface.c --- a/gui/interface.c Tue May 03 13:19:39 2011 +0000 +++ b/gui/interface.c Tue May 03 13:42:00 2011 +0000 @@ -169,8 +169,6 @@ guiIntfStruct.Balance = 50.0f; guiIntfStruct.StreamType = -1; - appInitStruct(); - memset(>kEquChannels, 0, sizeof(gtkEquChannels)); #ifdef CONFIG_DXR3