From: Geoffroy Couprie Date: Thu, 19 Feb 2009 00:35:51 +0000 (+0100) Subject: WinCE intf: LVITEM needs an index X-Git-Tag: 1.0.0-pre1~579 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3220b6ce9386c3dd498ae0b5f5e732a0cc895561;p=vlc WinCE intf: LVITEM needs an index --- diff --git a/modules/gui/wince/playlist.cpp b/modules/gui/wince/playlist.cpp index bd0ff587a2..fd695a4b8f 100644 --- a/modules/gui/wince/playlist.cpp +++ b/modules/gui/wince/playlist.cpp @@ -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;