diff gui/mplayer/pb.c @ 32931:03b1051bed5c

Rename the 'NumberOf' members of the listItems structure. Since the NumberOfMainItems, NumberOfBarItems and NumberOfMenuItems members actually hold the last index used rather than the number of items, rename them 'IndexOf' to avoid further confusion. Besides, change their loop conditions to meet the new name.
author ib
date Thu, 03 Mar 2011 14:37:47 +0000
parents 933e784fb598
children 21e0de9c355f
line wrap: on
line diff
--- a/gui/mplayer/pb.c	Thu Mar 03 14:13:41 2011 +0000
+++ b/gui/mplayer/pb.c	Thu Mar 03 14:37:47 2011 +0000
@@ -106,7 +106,7 @@
    vo_mouse_autohide=0;
 
    fast_memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize );
-   Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.NumberOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
+   Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.IndexOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
    wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize );
   }
  wsPutImage( &appMPlayer.barWindow );
@@ -122,7 +122,7 @@
  static int     SelectedItem = -1;
 	int     currentselected = -1;
 
- for ( i=0;i < appMPlayer.NumberOfBarItems + 1;i++ )
+ for ( i=0;i <= appMPlayer.IndexOfBarItems;i++ )
    if ( ( appMPlayer.barItems[i].pressed != btnDisabled )&&
       ( wgIsRect( X,Y,appMPlayer.barItems[i].x,appMPlayer.barItems[i].y,appMPlayer.barItems[i].x+appMPlayer.barItems[i].width,appMPlayer.barItems[i].y+appMPlayer.barItems[i].height ) ) )
     { currentselected=i; break; }