[MPlayer-cvslog] r33025 - trunk/gui/app.h

ib subversion at mplayerhq.hu
Fri Mar 4 14:58:49 CET 2011


Author: ib
Date: Fri Mar  4 14:58:48 2011
New Revision: 33025

Log:
Reduce item arrays to reasonable size.

The current maximum of items used in skins is 46 (for main), 27 (for bar)
and 15 (for menu), so 64 seems to be a reasonable value.

The symbolic constant will allow to check for out-of-bounds array access later
(which currently isn't performed) and issue an appropriate error message.

Modified:
   trunk/gui/app.h

Modified: trunk/gui/app.h
==============================================================================
--- trunk/gui/app.h	Fri Mar  4 13:50:21 2011	(r33024)
+++ trunk/gui/app.h	Fri Mar  4 14:58:48 2011	(r33025)
@@ -130,6 +130,10 @@ typedef struct {
 #define btnReleased 1
 #define btnPressed  2
 
+// Item definition
+
+#define MAX_ITEMS 64
+
 typedef struct {
     int type;
 
@@ -177,13 +181,13 @@ typedef struct {
     int menuIsPresent;
 
     int IndexOfMainItems;
-    wItem mainItems[256];
+    wItem mainItems[MAX_ITEMS];
 
     int IndexOfBarItems;
-    wItem barItems[256];
+    wItem barItems[MAX_ITEMS];
 
     int IndexOfMenuItems;
-    wItem menuItems[64];
+    wItem menuItems[MAX_ITEMS];
 } guiItems;
 
 extern guiItems appMPlayer;


More information about the MPlayer-cvslog mailing list