# HG changeset patch # User ib # Date 1299158000 0 # Node ID 7c205a5c2a9bbfe030fb6cbe87e9eaf793e3521a # Parent 992a4b9d7624fdc0fb466110d5789d0b0d86f78d Remove parameter from appInitStruct() function. Since there is only one listItems structure variable (the global appMPlayer), there is no need to pass it to the function. diff -r 992a4b9d7624 -r 7c205a5c2a9b gui/app.c --- a/gui/app.c Thu Mar 03 12:30:50 2011 +0000 +++ b/gui/app.c Thu Mar 03 13:13:20 2011 +0000 @@ -106,43 +106,43 @@ item->tmp = 0; } -void appInitStruct(listItems *item) +void appInitStruct(void) { int i; - for (i = 0; i < item->NumberOfMainItems; i++) - appClearItem(&item->mainItems[i]); - for (i = 0; i < item->NumberOfBarItems; i++) - appClearItem(&item->barItems[i]); - for (i = 0; i < item->NumberOfMenuItems; i++) - appClearItem(&item->menuItems[i]); + for (i = 0; i < appMPlayer.NumberOfMainItems; i++) + appClearItem(&appMPlayer.mainItems[i]); + for (i = 0; i < appMPlayer.NumberOfBarItems; i++) + appClearItem(&appMPlayer.barItems[i]); + for (i = 0; i < appMPlayer.NumberOfMenuItems; i++) + appClearItem(&appMPlayer.menuItems[i]); - item->NumberOfMainItems = -1; - memset(item->mainItems, 0, 256 * sizeof(wItem)); + appMPlayer.NumberOfMainItems = -1; + memset(appMPlayer.mainItems, 0, 256 * sizeof(wItem)); - item->NumberOfMenuItems = -1; - memset(item->menuItems, 0, 64 * sizeof(wItem)); + appMPlayer.NumberOfMenuItems = -1; + memset(appMPlayer.menuItems, 0, 64 * sizeof(wItem)); - item->NumberOfBarItems = -1; - memset(item->barItems, 0, 256 * sizeof(wItem)); + appMPlayer.NumberOfBarItems = -1; + memset(appMPlayer.barItems, 0, 256 * sizeof(wItem)); - appClearItem(&item->main); - item->mainDecoration = 0; + appClearItem(&appMPlayer.main); + appMPlayer.mainDecoration = 0; - appClearItem(&item->sub); - item->sub.width = 0; - item->sub.height = 0; - item->sub.x = -1; - item->sub.y = -1; + appClearItem(&appMPlayer.sub); + appMPlayer.sub.width = 0; + appMPlayer.sub.height = 0; + appMPlayer.sub.x = -1; + appMPlayer.sub.y = -1; - appClearItem(&item->menuBase); - appClearItem(&item->menuSelected); + appClearItem(&appMPlayer.menuBase); + appClearItem(&appMPlayer.menuSelected); - item->sub.R = item->sub.G = item->sub.B = 0; - item->bar.R = item->bar.G = item->bar.B = 0; - item->main.R = item->main.G = item->main.B = 0; - item->barIsPresent = 0; - item->menuIsPresent = 0; + appMPlayer.sub.R = appMPlayer.sub.G = appMPlayer.sub.B = 0; + appMPlayer.bar.R = appMPlayer.bar.G = appMPlayer.bar.B = 0; + appMPlayer.main.R = appMPlayer.main.G = appMPlayer.main.B = 0; + appMPlayer.barIsPresent = 0; + appMPlayer.menuIsPresent = 0; } int appFindMessage(unsigned char *str) diff -r 992a4b9d7624 -r 7c205a5c2a9b gui/app.h --- a/gui/app.h Thu Mar 03 12:30:50 2011 +0000 +++ b/gui/app.h Thu Mar 03 13:13:20 2011 +0000 @@ -189,7 +189,7 @@ extern listItems appMPlayer; int appFindMessage(unsigned char *); -void appInitStruct(listItems *); +void appInitStruct(void); void btnModify(int, float); void btnSet(int, int); diff -r 992a4b9d7624 -r 7c205a5c2a9b gui/skin/skin.c --- a/gui/skin/skin.c Thu Mar 03 12:30:50 2011 +0000 +++ b/gui/skin/skin.c Thu Mar 03 13:13:20 2011 +0000 @@ -885,7 +885,7 @@ mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] file: %s\n", fn); - appInitStruct(&appMPlayer); + appInitStruct(); fntFreeFont(); linenumber = 0;