winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
5 participants
1115 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/listview: Fix a test failure on 4.7x.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 6e09365501391d639f881dd86d258b911415e51c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e09365501391d639f881dd86…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Jun 21 16:49:19 2009 +0400 comctl32/listview: Fix a test failure on 4.7x. --- dlls/comctl32/tests/listview.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 6f6fdf7..060171c 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1362,7 +1362,9 @@ static void test_create(void) ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP); hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); + ok(IsWindow(hHeader) || + broken(!IsWindow(hHeader)), /* 4.7x common controls */ + "Header should be created\n"); ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); DestroyWindow(hList);
1
0
0
0
Nikolay Sivov : comctl32/header: Add support for HDS_FLAT style.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 25d916e73a454da0d6fd8ea4f7a8b4927e10047b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25d916e73a454da0d6fd8ea4f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Jun 21 01:25:03 2009 +0400 comctl32/header: Add support for HDS_FLAT style. --- dlls/comctl32/header.c | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index fed582d..1486a8a 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -329,18 +329,21 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU } else { HBRUSH hbr; - - if (infoPtr->dwStyle & HDS_BUTTONS) { - if (phdi->bDown) { - DrawEdge (hdc, &r, BDR_RAISEDOUTER, - BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST); + + if (!(infoPtr->dwStyle & HDS_FLAT)) + { + if (infoPtr->dwStyle & HDS_BUTTONS) { + if (phdi->bDown) { + DrawEdge (hdc, &r, BDR_RAISEDOUTER, + BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST); + } + else + DrawEdge (hdc, &r, EDGE_RAISED, + BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST); } else - DrawEdge (hdc, &r, EDGE_RAISED, - BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST); + DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST); } - else - DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST); hbr = CreateSolidBrush(GetBkColor(hdc)); FillRect(hdc, &r, hbr); @@ -547,14 +550,19 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc) if (theme != NULL) { DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL); } - else { + else if (infoPtr->dwStyle & HDS_FLAT) { + hbrBk = GetSysColorBrush(COLOR_3DFACE); + FillRect(hdc, &rcRest, hbrBk); + } + else + { if (infoPtr->dwStyle & HDS_BUTTONS) DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE); else DrawEdge (hdc, &rcRest, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE); } } - + if (infoPtr->iHotDivider != -1) HEADER_DrawHotDivider(infoPtr, hdc);
1
0
0
0
Nikolay Sivov : comctl32/listview: Implement LVM_MAPIDTOINDEX/ LVM_MAPINDEXTOID.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 85224d7f17755e366a1bfb54928f621c80ded4b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85224d7f17755e366a1bfb549…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Jun 21 00:48:07 2009 +0400 comctl32/listview: Implement LVM_MAPIDTOINDEX/LVM_MAPINDEXTOID. --- dlls/comctl32/listview.c | 120 +++++++++++++++++++++++++++++++++++++++- dlls/comctl32/tests/listview.c | 33 ++++++++++- 2 files changed, 147 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 53298be..f0a294e 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -124,7 +124,6 @@ * -- LVM_INSERTGROUPSORTED * -- LVM_INSERTMARKHITTEST * -- LVM_ISGROUPVIEWENABLED - * -- LVM_MAPIDTOINDEX, LVM_MAPINDEXTOID * -- LVM_MOVEGROUP * -- LVM_MOVEITEMTOGROUP * -- LVM_SETINFOTIP @@ -194,14 +193,23 @@ typedef struct tagSUBITEM_INFO INT iSubItem; } SUBITEM_INFO; +typedef struct tagITEM_ID ITEM_ID; + typedef struct tagITEM_INFO { ITEMHDR hdr; UINT state; LPARAM lParam; INT iIndent; + ITEM_ID *id; } ITEM_INFO; +struct tagITEM_ID +{ + UINT id; /* item id */ + HDPA item; /* link to item data */ +}; + typedef struct tagRANGE { INT lower; @@ -278,6 +286,7 @@ typedef struct tagLISTVIEW_INFO DWORD uView; /* current view available through LVM_[G,S]ETVIEW */ INT nItemCount; /* the number of items in the list */ HDPA hdpaItems; /* array ITEM_INFO pointers */ + HDPA hdpaItemIds; /* array of ITEM_ID pointers */ HDPA hdpaPosX; /* maintains the (X, Y) coordinates of the */ HDPA hdpaPosY; /* items in LVS_ICON, and LVS_SMALLICON modes */ HDPA hdpaColumns; /* array of COLUMN_INFO pointers */ @@ -1430,6 +1439,19 @@ static inline void map_style_view(LISTVIEW_INFO *infoPtr) } } +/* computes next item id value */ +static DWORD get_next_itemid(const LISTVIEW_INFO *infoPtr) +{ + INT count = DPA_GetPtrCount(infoPtr->hdpaItemIds); + + if (count > 0) + { + ITEM_ID *lpID = DPA_GetPtr(infoPtr->hdpaItemIds, count - 1); + return lpID->id + 1; + } + return 0; +} + /******** Internal API functions ************************************/ static inline COLUMN_INFO * LISTVIEW_GetColumnInfo(const LISTVIEW_INFO *infoPtr, INT nSubItem) @@ -2310,6 +2332,76 @@ static void LISTVIEW_GetItemBox(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT OffsetRect(lprcBox, Position.x + Origin.x, Position.y + Origin.y); } +/* LISTVIEW_MapIdToIndex helper */ +INT CALLBACK MapIdSearchCompare(LPVOID p1, LPVOID p2, LPARAM lParam) +{ + ITEM_ID *id1 = (ITEM_ID*)p1; + ITEM_ID *id2 = (ITEM_ID*)p2; + + if (id1->id == id2->id) return 0; + + return (id1->id < id2->id) ? -1 : 1; +} + +/*** + * DESCRIPTION: + * Returns the item index for id specified. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] iID : item id to get index for + * + * RETURN: + * Item index, or -1 on failure. + */ +static INT LISTVIEW_MapIdToIndex(const LISTVIEW_INFO *infoPtr, UINT iID) +{ + ITEM_ID ID; + INT index; + + TRACE("iID=%d\n", iID); + + if (infoPtr->dwStyle & LVS_OWNERDATA) return -1; + if (infoPtr->nItemCount == 0) return -1; + + ID.id = iID; + index = DPA_Search(infoPtr->hdpaItemIds, &ID, -1, &MapIdSearchCompare, 0, DPAS_SORTED); + + if (index != -1) + { + ITEM_ID *lpID = DPA_GetPtr(infoPtr->hdpaItemIds, index); + return DPA_GetPtrIndex(infoPtr->hdpaItems, lpID->item); + } + + return -1; +} + +/*** + * DESCRIPTION: + * Returns the item id for index given. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] iItem : item index to get id for + * + * RETURN: + * Item id. + */ +static DWORD LISTVIEW_MapIndexToId(const LISTVIEW_INFO *infoPtr, INT iItem) +{ + ITEM_INFO *lpItem; + HDPA hdpaSubItems; + + TRACE("iItem=%d\n", iItem); + + if (infoPtr->dwStyle & LVS_OWNERDATA) return -1; + if (iItem < 0 || iItem >= infoPtr->nItemCount) return -1; + + hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, iItem); + lpItem = DPA_GetPtr(hdpaSubItems, 0); + + return lpItem->id->id; +} /*** * DESCRIPTION: @@ -4988,9 +5080,18 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) { HDPA hdpaSubItems; ITEMHDR *hdrItem; + ITEM_INFO *lpItem; + ITEM_ID *lpID; INT i; hdpaSubItems = DPA_DeletePtr(infoPtr->hdpaItems, nItem); + lpItem = DPA_GetPtr(hdpaSubItems, 0); + + /* free id struct */ + i = DPA_GetPtrIndex(infoPtr->hdpaItemIds, lpItem->id); + lpID = DPA_GetPtr(infoPtr->hdpaItemIds, i); + DPA_DeletePtr(infoPtr->hdpaItemIds, i); + Free(lpID); for (i = 0; i < DPA_GetPtrCount(hdpaSubItems); i++) { hdrItem = DPA_GetPtr(hdpaSubItems, i); @@ -6815,6 +6916,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, HDPA hdpaSubItems; NMLISTVIEW nmlv; ITEM_INFO *lpItem; + ITEM_ID *lpID; BOOL is_sorted, has_changed; LVITEMW item; HWND hwndSelf = infoPtr->hwndSelf; @@ -6834,6 +6936,13 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail; if ( !DPA_SetPtr(hdpaSubItems, 0, lpItem) ) assert (FALSE); + /* link with id struct */ + if (!(lpID = Alloc(sizeof(ITEM_ID)))) goto fail; + lpItem->id = lpID; + lpID->item = hdpaSubItems; + lpID->id = get_next_itemid(infoPtr); + if ( DPA_InsertPtr(infoPtr->hdpaItemIds, infoPtr->nItemCount, lpID) == -1) goto fail; + is_sorted = (infoPtr->dwStyle & (LVS_SORTASCENDING | LVS_SORTDESCENDING)) && !(infoPtr->dwStyle & LVS_OWNERDRAWFIXED) && (LPSTR_TEXTCALLBACKW != lpLVItem->pszText); @@ -8483,6 +8592,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs) /* allocate memory for the data structure */ if (!(infoPtr->selectionRanges = ranges_create(10))) goto fail; if (!(infoPtr->hdpaItems = DPA_Create(10))) goto fail; + if (!(infoPtr->hdpaItemIds = DPA_Create(10))) goto fail; if (!(infoPtr->hdpaPosX = DPA_Create(10))) goto fail; if (!(infoPtr->hdpaPosY = DPA_Create(10))) goto fail; if (!(infoPtr->hdpaColumns = DPA_Create(10))) goto fail; @@ -8492,6 +8602,7 @@ fail: DestroyWindow(infoPtr->hwndHeader); ranges_destroy(infoPtr->selectionRanges); DPA_Destroy(infoPtr->hdpaItems); + DPA_Destroy(infoPtr->hdpaItemIds); DPA_Destroy(infoPtr->hdpaPosX); DPA_Destroy(infoPtr->hdpaPosY); DPA_Destroy(infoPtr->hdpaColumns); @@ -9264,6 +9375,7 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr) /* destroy data structure */ DPA_Destroy(infoPtr->hdpaItems); + DPA_Destroy(infoPtr->hdpaItemIds); DPA_Destroy(infoPtr->hdpaPosX); DPA_Destroy(infoPtr->hdpaPosY); DPA_Destroy(infoPtr->hdpaColumns); @@ -10381,9 +10493,11 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case LVM_ISITEMVISIBLE: return LISTVIEW_IsItemVisible(infoPtr, (INT)wParam); - /* case LVM_MAPIDTOINDEX: */ + case LVM_MAPIDTOINDEX: + return LISTVIEW_MapIdToIndex(infoPtr, (UINT)wParam); - /* case LVM_MAPINDEXTOID: */ + case LVM_MAPINDEXTOID: + return LISTVIEW_MapIndexToId(infoPtr, (INT)wParam); /* case LVM_MOVEGROUP: */ diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index de899f5..6f6fdf7 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3588,24 +3588,51 @@ static void test_mapidindex(void) HWND hwnd; DWORD ret; + /* LVM_MAPINDEXTOID unsupported with LVS_OWNERDATA */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + insert_item(hwnd, 0); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); + expect(-1, ret); + DestroyWindow(hwnd); + hwnd = create_listview_control(0); ok(hwnd != NULL, "failed to create a listview window\n"); + /* LVM_MAPINDEXTOID with invalid index */ + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); + expect(-1, ret); + insert_item(hwnd, 0); insert_item(hwnd, 1); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, -1, 0); + expect(-1, ret); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 2, 0); + expect(-1, ret); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); expect(0, ret); ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); - todo_wine expect(1, ret); + expect(1, ret); /* remove 0 indexed item, id retained */ SendMessage(hwnd, LVM_DELETEITEM, 0, 0); ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); - todo_wine expect(1, ret); + expect(1, ret); /* new id starts from previous value */ insert_item(hwnd, 1); ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); - todo_wine expect(2, ret); + expect(2, ret); + + /* get index by id */ + ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, -1, 0); + expect(-1, ret); + ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 0, 0); + expect(-1, ret); + ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 1, 0); + expect(0, ret); + ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 2, 0); + expect(1, ret); DestroyWindow(hwnd); }
1
0
0
0
Nikolay Sivov : comctl32/listview: Basic LVM_MAPINDEXTOID tests.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 2286a321c24ba88dcf2574b281fc7b2c80dbc409 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2286a321c24ba88dcf2574b28…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Jun 20 14:56:55 2009 +0400 comctl32/listview: Basic LVM_MAPINDEXTOID tests. --- dlls/comctl32/tests/listview.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 7d14294..de899f5 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3583,6 +3583,33 @@ static void test_canceleditlabel(void) DestroyWindow(hwnd); } +static void test_mapidindex(void) +{ + HWND hwnd; + DWORD ret; + + hwnd = create_listview_control(0); + ok(hwnd != NULL, "failed to create a listview window\n"); + + insert_item(hwnd, 0); + insert_item(hwnd, 1); + + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); + expect(0, ret); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); + todo_wine expect(1, ret); + /* remove 0 indexed item, id retained */ + SendMessage(hwnd, LVM_DELETEITEM, 0, 0); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); + todo_wine expect(1, ret); + /* new id starts from previous value */ + insert_item(hwnd, 1); + ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); + todo_wine expect(2, ret); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -3648,6 +3675,7 @@ START_TEST(listview) /* comctl32 version 6 tests start here */ test_get_set_view(); test_canceleditlabel(); + test_mapidindex(); unload_v6_module(ctx_cookie);
1
0
0
0
Nikolay Sivov : comctl32/listview: Implement LVM_ISITEMVISIBLE.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 76cb9c0d77d1652be1f306f5cc6d15a1cd78320e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76cb9c0d77d1652be1f306f5c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Jun 20 02:28:20 2009 +0400 comctl32/listview: Implement LVM_ISITEMVISIBLE. --- dlls/comctl32/listview.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/commctrl.h | 1 + 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index f9608c6..53298be 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6946,6 +6946,44 @@ fail: /*** * DESCRIPTION: + * Checks item visibility. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] nFirst : item index to check for + * + * RETURN: + * Item visible : TRUE + * Item invisible or failure : FALSE + */ +static BOOL LISTVIEW_IsItemVisible(const LISTVIEW_INFO *infoPtr, INT nItem) +{ + POINT Origin, Position; + RECT rcItem; + HDC hdc; + BOOL ret; + + TRACE("nItem=%d\n", nItem); + + if (nItem < 0 || nItem >= DPA_GetPtrCount(infoPtr->hdpaItems)) return FALSE; + + LISTVIEW_GetOrigin(infoPtr, &Origin); + LISTVIEW_GetItemOrigin(infoPtr, nItem, &Position); + rcItem.left = Position.x + Origin.x; + rcItem.top = Position.y + Origin.y; + rcItem.right = rcItem.left + infoPtr->nItemWidth; + rcItem.bottom = rcItem.top + infoPtr->nItemHeight; + + hdc = GetDC(infoPtr->hwndSelf); + if (!hdc) return FALSE; + ret = RectVisible(hdc, &rcItem); + ReleaseDC(infoPtr->hwndSelf, hdc); + + return ret; +} + +/*** + * DESCRIPTION: * Redraws a range of items. * * PARAMETER(S): @@ -10340,6 +10378,9 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) /* case LVM_ISGROUPVIEWENABLED: */ + case LVM_ISITEMVISIBLE: + return LISTVIEW_IsItemVisible(infoPtr, (INT)wParam); + /* case LVM_MAPIDTOINDEX: */ /* case LVM_MAPINDEXTOID: */ diff --git a/include/commctrl.h b/include/commctrl.h index b064c01..6eb5f32 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3252,6 +3252,7 @@ static const WCHAR WC_LISTVIEWW[] = { 'S','y','s', #define LVM_CANCELEDITLABEL (LVM_FIRST + 179) #define LVM_MAPINDEXTOID (LVM_FIRST + 180) #define LVM_MAPIDTOINDEX (LVM_FIRST + 181) +#define LVM_ISITEMVISIBLE (LVM_FIRST + 182) #define LVN_FIRST (0U-100U) #define LVN_LAST (0U-199U)
1
0
0
0
Nikolay Sivov : comctl32/listview: Implement LVM_CANCELEDITLABEL with tests .
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 9c565342d02f8df86c6b474bd5b410ca3276bcd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c565342d02f8df86c6b474bd…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Jun 20 00:39:50 2009 +0400 comctl32/listview: Implement LVM_CANCELEDITLABEL with tests. --- dlls/comctl32/listview.c | 31 +++++++++++++++++++----- dlls/comctl32/tests/listview.c | 50 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ebf49c6..f9608c6 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -106,7 +106,6 @@ * -- LVN_BEGINRDRAG * * Messages: - * -- LVM_CANCELEDITLABEL * -- LVM_ENABLEGROUPVIEW * -- LVM_GETBKIMAGE, LVM_SETBKIMAGE * -- LVM_GETGROUPINFO, LVM_SETGROUPINFO @@ -419,6 +418,7 @@ static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *, INT, BOOL); static HWND CreateEditLabelT(LISTVIEW_INFO *, LPCWSTR, DWORD, BOOL); static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *, INT, HIMAGELIST); static INT LISTVIEW_HitTest(const LISTVIEW_INFO *, LPLVHITTESTINFO, BOOL, BOOL); +static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *, BOOL, BOOL); /******** Text handling functions *************************************/ @@ -4591,6 +4591,26 @@ static DWORD LISTVIEW_ApproximateViewRect(const LISTVIEW_INFO *infoPtr, INT nIte return dwViewRect; } +/*** + * DESCRIPTION: + * Cancel edit label with saving item text. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * + * RETURN: + * Always returns TRUE. + */ +static LRESULT LISTVIEW_CancelEditLabel(LISTVIEW_INFO *infoPtr) +{ + /* handle value will be lost after LISTVIEW_EndEditLabelT */ + HWND edit = infoPtr->hwndEdit; + + LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit)); + SendMessageW(edit, WM_CLOSE, 0, 0); + + return TRUE; +} /*** * DESCRIPTION: @@ -10113,7 +10133,8 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case LVM_ARRANGE: return LISTVIEW_Arrange(infoPtr, (INT)wParam); -/* case LVM_CANCELEDITLABEL: */ + case LVM_CANCELEDITLABEL: + return LISTVIEW_CancelEditLabel(infoPtr); case LVM_CREATEDRAGIMAGE: return (LRESULT)LISTVIEW_CreateDragImage(infoPtr, (INT)wParam, (LPPOINT)lParam); @@ -10734,11 +10755,7 @@ static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lP } case EN_KILLFOCUS: { - /* handle value will be lost after LISTVIEW_EndEditLabelT */ - HWND edit = infoPtr->hwndEdit; - - LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit)); - SendMessageW(edit, WM_CLOSE, 0, 0); + LISTVIEW_CancelEditLabel(infoPtr); } default: diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 2c3ab64..7d14294 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -3534,6 +3534,55 @@ static void test_get_set_view(void) DestroyWindow(hwnd); } +static void test_canceleditlabel(void) +{ + HWND hwnd, hwndedit; + DWORD ret; + CHAR buff[10]; + LVITEMA itema; + static CHAR test[] = "test"; + static const CHAR test1[] = "test1"; + + hwnd = create_listview_control(LVS_EDITLABELS); + ok(hwnd != NULL, "failed to create a listview window\n"); + + insert_item(hwnd, 0); + + /* try without edit created */ + ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); + expect(TRUE, ret); + + /* cancel without data change */ + SetFocus(hwnd); + hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); + ok(IsWindow(hwndedit), "Expected edit control to be created\n"); + ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); + expect(TRUE, ret); + ok(!IsWindow(hwndedit), "Expected edit control to be destroyed\n"); + + /* cancel after data change */ + memset(&itema, 0, sizeof(itema)); + itema.pszText = test; + ret = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&itema); + expect(TRUE, ret); + SetFocus(hwnd); + hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); + ok(IsWindow(hwndedit), "Expected edit control to be created\n"); + ret = SetWindowText(hwndedit, test1); + ok(ret != 0, "Expected edit text to change\n"); + ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); + expect(TRUE, ret); + ok(!IsWindow(hwndedit), "Expected edit control to be destroyed\n"); + memset(&itema, 0, sizeof(itema)); + itema.pszText = buff; + itema.cchTextMax = sizeof(buff)/sizeof(CHAR); + ret = SendMessage(hwnd, LVM_GETITEMTEXT, 0, (LPARAM)&itema); + expect(5, ret); + ok(strcmp(buff, test1) == 0, "Expected label text not to change\n"); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -3598,6 +3647,7 @@ START_TEST(listview) /* comctl32 version 6 tests start here */ test_get_set_view(); + test_canceleditlabel(); unload_v6_module(ctx_cookie);
1
0
0
0
Henri Verbeet : wined3d: Add an rtInternal fallback for WINED3DFMT_R16G16_UNORM.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: e5e4d1e9a7ace4057eeed3a28d5f0a8ace8b480c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5e4d1e9a7ace4057eeed3a28…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jun 22 10:16:01 2009 +0200 wined3d: Add an rtInternal fallback for WINED3DFMT_R16G16_UNORM. --- dlls/wined3d/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 881736e..82d5527 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -353,7 +353,7 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = { GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, WINED3D_GL_EXT_NONE}, - {WINED3DFMT_R16G16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, 0, + {WINED3DFMT_R16G16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GL_RGBA16_EXT, GL_RGB, GL_UNSIGNED_SHORT, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, WINED3D_GL_EXT_NONE},
1
0
0
0
Henri Verbeet : wined3d: Get rid of some asserts.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 404f4f73214c52c985adaeae6e18187c1a08cb66 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=404f4f73214c52c985adaeae6…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jun 22 10:16:00 2009 +0200 wined3d: Get rid of some asserts. --- dlls/wined3d/directx.c | 3 --- dlls/wined3d/palette.c | 5 +++-- dlls/wined3d/surface_base.c | 5 ----- dlls/wined3d/surface_gdi.c | 1 - 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 25fd4d4..536d7a4 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -23,7 +23,6 @@ */ #include "config.h" -#include <assert.h> #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); @@ -242,7 +241,6 @@ static void WineD3D_ReleaseFakeGLContext(void) { wined3d_fake_gl_context_hwnd = NULL; wined3d_fake_gl_context_available = FALSE; } - assert(wined3d_fake_gl_context_ref >= 0); LeaveCriticalSection(&wined3d_fake_gl_context_cs); } @@ -254,7 +252,6 @@ static BOOL WineD3D_CreateFakeGLContext(void) { TRACE("getting context...\n"); if(wined3d_fake_gl_context_ref > 0) goto ret; - assert(0 == wined3d_fake_gl_context_ref); wined3d_fake_gl_context_foreign = TRUE; diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index 338e66e..a5447d0 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -22,7 +22,6 @@ #include "winerror.h" #include "wine/debug.h" -#include <assert.h> #include <string.h> #include "wined3d_private.h" @@ -78,7 +77,9 @@ DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) { case WINEDDPCAPS_2BIT: return 4; case WINEDDPCAPS_4BIT: return 16; case WINEDDPCAPS_8BIT: return 256; - default: assert(0); return 256; + default: + FIXME("Unhandled size bits %#x.\n", dwFlags & SIZE_BITS); + return 256; } } diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index d776785..44b9423 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -30,8 +30,6 @@ #include "wine/port.h" #include "wined3d_private.h" -#include <assert.h> - WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); /* See also float_16_to_32() in wined3d_private.h */ @@ -1117,8 +1115,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D dstwidth = xdst.right - xdst.left; width = (xdst.right - xdst.left) * bpp; - assert(width <= dlock.Pitch); - if (DestRect && Src != This) dbuf = dlock.pBits; else @@ -1619,7 +1615,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst slock.Pitch = dlock.Pitch; /* Since slock was originally copied from this surface's description, we can just reuse it */ - assert(This->resource.allocatedMemory != NULL); sbuf = This->resource.allocatedMemory + lock_src.top * pitch + lock_src.left * bpp; dbuf = This->resource.allocatedMemory + lock_dst.top * pitch + lock_dst.left * bpp; sEntry = Src->resource.format_desc; diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index a194569..96054d9 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -29,7 +29,6 @@ #include "wine/port.h" #include "wined3d_private.h" -#include <assert.h> #include <stdio.h> /* Use the d3d_surface debug channel to have one channel for all surfaces */
1
0
0
0
Henri Verbeet : wined3d: Get rid of DEBUG_SINGLE_MODE.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 7598ab2c849a50ca482becab3d19fc1b3b6af7d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7598ab2c849a50ca482becab3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jun 22 10:15:59 2009 +0200 wined3d: Get rid of DEBUG_SINGLE_MODE. --- dlls/wined3d/directx.c | 82 ++++++++++++++++++++--------------------------- 1 files changed, 35 insertions(+), 47 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index df5d4cc..25fd4d4 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -22,13 +22,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* Compile time diagnostics: */ - -#ifndef DEBUG_SINGLE_MODE -/* Set to 1 to force only a single display mode to be exposed: */ -#define DEBUG_SINGLE_MODE 0 -#endif - #include "config.h" #include <assert.h> #include "wined3d_private.h" @@ -1572,40 +1565,39 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad /* TODO: Store modes per adapter and read it from the adapter structure */ if (Adapter == 0) { /* Display */ - int i = 0; - int j = 0; + unsigned int i = 0; + unsigned int j = 0; + DEVMODEW mode; - if (!DEBUG_SINGLE_MODE) { - DEVMODEW DevModeW; + memset(&mode, 0, sizeof(mode)); + mode.dmSize = sizeof(mode); - ZeroMemory(&DevModeW, sizeof(DevModeW)); - DevModeW.dmSize = sizeof(DevModeW); - while (EnumDisplaySettingsExW(NULL, j, &DevModeW, 0)) { - j++; - switch (Format) - { - case WINED3DFMT_UNKNOWN: - /* This is for D3D8, do not enumerate P8 here */ - if (DevModeW.dmBitsPerPel == 32 || - DevModeW.dmBitsPerPel == 16) i++; - break; - case WINED3DFMT_X8R8G8B8: - if (DevModeW.dmBitsPerPel == 32) i++; - break; - case WINED3DFMT_R5G6B5: - if (DevModeW.dmBitsPerPel == 16) i++; - break; - case WINED3DFMT_P8: - if (DevModeW.dmBitsPerPel == 8) i++; - break; - default: - /* Skip other modes as they do not match the requested format */ - break; - } + while (EnumDisplaySettingsExW(NULL, j, &mode, 0)) + { + ++j; + switch (Format) + { + case WINED3DFMT_UNKNOWN: + /* This is for D3D8, do not enumerate P8 here */ + if (mode.dmBitsPerPel == 32 || mode.dmBitsPerPel == 16) ++i; + break; + + case WINED3DFMT_X8R8G8B8: + if (mode.dmBitsPerPel == 32) ++i; + break; + + case WINED3DFMT_R5G6B5: + if (mode.dmBitsPerPel == 16) ++i; + break; + + case WINED3DFMT_P8: + if (mode.dmBitsPerPel == 8) ++i; + break; + + default: + /* Skip other modes as they do not match the requested format */ + break; } - } else { - i = 1; - j = 1; } TRACE_(d3d_caps)("(%p}->(Adapter: %d) => %d (out of %d)\n", This, Adapter, i, j); @@ -1629,7 +1621,8 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte } /* TODO: Store modes per adapter and read it from the adapter structure */ - if (Adapter == 0 && !DEBUG_SINGLE_MODE) { /* Display */ + if (Adapter == 0) + { DEVMODEW DevModeW; int ModeIdx = 0; UINT i = 0; @@ -1693,14 +1686,9 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte pMode->RefreshRate, pMode->Format, debug_d3dformat(pMode->Format), DevModeW.dmBitsPerPel); - } else if (DEBUG_SINGLE_MODE) { - /* Return one setting of the format requested */ - if (Mode > 0) return WINED3DERR_INVALIDCALL; - pMode->Width = 800; - pMode->Height = 600; - pMode->RefreshRate = 60; - pMode->Format = (Format == WINED3DFMT_UNKNOWN) ? WINED3DFMT_X8R8G8B8 : Format; - } else { + } + else + { FIXME_(d3d_caps)("Adapter not primary display\n"); }
1
0
0
0
Henri Verbeet : wined3d: Move the num_untracked_materials lookup out of the main drawing loop.
by Alexandre Julliard
22 Jun '09
22 Jun '09
Module: wine Branch: master Commit: 9a58f37cd39d5dc8c1526eeb0b5d0c63cb43bcd8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a58f37cd39d5dc8c1526eeb0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jun 22 10:15:58 2009 +0200 wined3d: Move the num_untracked_materials lookup out of the main drawing loop. --- dlls/wined3d/drawprim.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index c644aa2..dcdf21a 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -86,6 +86,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_i const BYTE *texCoords[WINED3DDP_MAXTEXCOORD]; const BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL; const struct wined3d_stream_info_element *element; + UINT num_untracked_materials; DWORD tex_mask = 0; TRACE("Using slow vertex array code\n"); @@ -121,7 +122,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_i element = &si->elements[WINED3D_FFP_DIFFUSE]; if (element->data) diffuse = element->data + streamOffset[element->stream_idx]; else glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - if (This->activeContext->num_untracked_materials && element->format_desc->format != WINED3DFMT_A8R8G8B8) + num_untracked_materials = This->activeContext->num_untracked_materials; + if (num_untracked_materials && element->format_desc->format != WINED3DFMT_A8R8G8B8) FIXME("Implement diffuse color tracking from %s\n", debug_d3dformat(element->format_desc->format)); element = &si->elements[WINED3D_FFP_SPECULAR]; @@ -246,7 +248,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_i const void *ptrToCoords = diffuse + SkipnStrides * si->elements[WINED3D_FFP_DIFFUSE].stride; diffuse_funcs[si->elements[WINED3D_FFP_DIFFUSE].format_desc->emit_idx](ptrToCoords); - if(This->activeContext->num_untracked_materials) { + if (num_untracked_materials) + { DWORD diffuseColor = ((const DWORD *)ptrToCoords)[0]; unsigned char i; float color[4]; @@ -256,7 +259,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_i color[2] = D3DCOLOR_B_B(diffuseColor) / 255.0; color[3] = D3DCOLOR_B_A(diffuseColor) / 255.0; - for(i = 0; i < This->activeContext->num_untracked_materials; i++) { + for (i = 0; i < num_untracked_materials; ++i) + { glMaterialfv(GL_FRONT_AND_BACK, This->activeContext->untracked_materials[i], color); } }
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200