]> git.sesse.net Git - vlc/commitdiff
WinCE intf: LVITEM needs an index
authorGeoffroy Couprie <geo.couprie@gmail.com>
Thu, 19 Feb 2009 00:35:51 +0000 (01:35 +0100)
committerGeoffroy Couprie <geo.couprie@gmail.com>
Thu, 19 Feb 2009 00:39:16 +0000 (01:39 +0100)
modules/gui/wince/playlist.cpp

index bd0ff587a20ebaef067447dce67b5c9ee6c7b4a7..fd695a4b8ff09051db0517036acb26104f9bdf79 100644 (file)
@@ -631,6 +631,8 @@ void Playlist::Rebuild()
     playlist_item_t * p_root = p_playlist->p_local_onelevel;
     playlist_item_t * p_child = NULL;
 
+    int iItem = 0;
+
     while( ( p_child = playlist_GetNextLeaf( p_playlist, p_root, p_child, FALSE, FALSE ) ) )
     {
         LVITEM lv;
@@ -638,12 +640,13 @@ void Playlist::Rebuild()
         lv.pszText = _T("");
         lv.cchTextMax = 1;
         lv.iSubItem = 0;
-        lv.iItem = i;
+        lv.iItem = iItem;
         ListView_InsertItem( hListView, &lv );
         ListView_SetItemText( hListView, lv.iItem, 0,
             _FROMMB(p_child->p_input->psz_name) );
 
         UpdateItem( p_child->i_id );
+        iItem++;
     }
     PL_UNLOCK;