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
March
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
September 2009
----- 2025 -----
March 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
3 participants
866 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/updown: Fix some test failures on Win95 ( comctl32 4.0).
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 484ef1dcbf7dd2f5bb4cd55080eec80596853200 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=484ef1dcbf7dd2f5bb4cd5508…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Sep 29 01:56:37 2009 +0400 comctl32/updown: Fix some test failures on Win95 (comctl32 4.0). --- dlls/comctl32/tests/updown.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 8797b9f..253e959 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -393,7 +393,15 @@ static void test_updown_pos32(void) /* Set the position to 0 to 1000 */ SendMessage(updown, UDM_SETRANGE32, 0 , 1000 ); + low = high = -1; r = SendMessage(updown, UDM_GETRANGE32, (WPARAM) &low , (LPARAM) &high ); + if (low == -1) + { + win_skip("UDM_SETRANGE32/UDM_GETRANGE32 not available\n"); + DestroyWindow(updown); + return; + } + expect(0,low); expect(1000,high); @@ -402,6 +410,7 @@ static void test_updown_pos32(void) if (!r) { win_skip("UDM_SETPOS32 and UDM_GETPOS32 need 5.80\n"); + DestroyWindow(updown); return; } expect(50,r); @@ -548,6 +557,12 @@ static void test_updown_unicode(void) r = SendMessage(updown, UDM_SETUNICODEFORMAT, 1 , 0); expect(0,r); r = SendMessage(updown, UDM_GETUNICODEFORMAT, 0 , 0); + if (!r) + { + win_skip("UDM_SETUNICODEFORMAT not available\n"); + DestroyWindow(updown); + return; + } expect(1,r); /* And now set it back to ANSI */
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Control elements should be centered in client area, and left/ top aligned if they don't.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: aadadd04fe5efd93d2007e1fe2f0e01ec15e6c1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aadadd04fe5efd93d2007e1fe…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Sep 29 00:44:45 2009 +0400 comctl32/monthcal: Control elements should be centered in client area, and left/top aligned if they don't. --- dlls/comctl32/monthcal.c | 52 ++++++++++++++++++++++++++++++++------------- 1 files changed, 37 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 6f60587..e0d5fcd 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1763,7 +1763,7 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) SIZE size; TEXTMETRICW tm; HFONT currentFont; - int xdiv, left_offset; + INT xdiv, dx, dy; RECT rcClient; GetClientRect(infoPtr->hwndSelf, &rcClient); @@ -1781,22 +1781,21 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) xdiv = (infoPtr->dwStyle & MCS_WEEKNUMBERS) ? 8 : 7; - infoPtr->width_increment = size.cx * 2 + 4; + infoPtr->width_increment = size.cx * 2 + 4; infoPtr->height_increment = infoPtr->textHeight; - left_offset = (rcClient.right - rcClient.left) - (infoPtr->width_increment * xdiv); /* calculate title area */ - title->top = rcClient.top; - title->bottom = title->top + 3 * infoPtr->height_increment / 2; - title->left = left_offset; - title->right = rcClient.right; + title->top = 0; + title->bottom = 3 * infoPtr->height_increment / 2; + title->left = 0; + title->right = infoPtr->width_increment * xdiv; /* set the dimensions of the next and previous buttons and center */ /* the month text vertically */ prev->top = next->top = title->top + 4; prev->bottom = next->bottom = title->bottom - 4; prev->left = title->left + 4; - prev->right = prev->left + (title->bottom - title->top) ; + prev->right = prev->left + (title->bottom - title->top); next->right = title->right - 4; next->left = next->right - (title->bottom - title->top); @@ -1808,24 +1807,47 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr) /* setup the dimensions of the rectangle we draw the names of the */ /* days of the week in */ - weeknumrect->left = left_offset; + weeknumrect->left = 0; + if(infoPtr->dwStyle & MCS_WEEKNUMBERS) - weeknumrect->right=prev->right; + weeknumrect->right = prev->right; else - weeknumrect->right=weeknumrect->left; + weeknumrect->right = weeknumrect->left; + wdays->left = days->left = weeknumrect->right; wdays->right = days->right = wdays->left + 7 * infoPtr->width_increment; - wdays->top = title->bottom ; + wdays->top = title->bottom; wdays->bottom = wdays->top + infoPtr->height_increment; - days->top = weeknumrect->top = wdays->bottom ; + days->top = weeknumrect->top = wdays->bottom; days->bottom = weeknumrect->bottom = days->top + 6 * infoPtr->height_increment; - todayrect->left = rcClient.left; - todayrect->right = rcClient.right; + todayrect->left = 0; + todayrect->right = title->right; todayrect->top = days->bottom; todayrect->bottom = days->bottom + infoPtr->height_increment; + /* offset all rectangles to center in client area */ + dx = (rcClient.right - title->right) / 2; + dy = (rcClient.bottom - todayrect->bottom) / 2; + + /* if calendar doesn't fit client area show it at left/top bounds */ + if (title->left + dx < 0) dx = 0; + if (title->top + dy < 0) dy = 0; + + if (dx != 0 || dy != 0) + { + OffsetRect(title, dx, dy); + OffsetRect(prev, dx, dy); + OffsetRect(next, dx, dy); + OffsetRect(titlemonth, dx, dy); + OffsetRect(titleyear, dx, dy); + OffsetRect(wdays, dx, dy); + OffsetRect(weeknumrect, dx, dy); + OffsetRect(days, dx, dy); + OffsetRect(todayrect, dx, dy); + } + TRACE("dx=%d dy=%d client[%s] title[%s] wdays[%s] days[%s] today[%s]\n", infoPtr->width_increment,infoPtr->height_increment, wine_dbgstr_rect(&rcClient),
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Minimal rectangle should be zero based.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 74eca56acb8ac4b09d6a2b710e1cd2b655bce71b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74eca56acb8ac4b09d6a2b710…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Sep 29 00:12:39 2009 +0400 comctl32/monthcal: Minimal rectangle should be zero based. --- dlls/comctl32/monthcal.c | 10 ++++++-- dlls/comctl32/tests/monthcal.c | 43 +++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 62c8dc8..6f60587 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -759,12 +759,16 @@ MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect) if(!lpRect) return FALSE; - lpRect->left = infoPtr->title.left; - lpRect->top = infoPtr->title.top; - lpRect->right = infoPtr->title.right; + lpRect->left = infoPtr->title.left; + lpRect->top = infoPtr->title.top; + lpRect->right = infoPtr->title.right; lpRect->bottom = infoPtr->todayrect.bottom; + AdjustWindowRect(lpRect, infoPtr->dwStyle, FALSE); + /* minimal rectangle is zero based */ + OffsetRect(lpRect, -lpRect->left, -lpRect->top); + TRACE("%s\n", wine_dbgstr_rect(lpRect)); return TRUE; diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 880ff69..5c5a8f8 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -853,17 +853,28 @@ static void test_monthcal_unicode(void) static void test_monthcal_hittest(void) { + typedef struct hittest_test + { + UINT ht; + int todo; + } hittest_test_t; + + static const hittest_test_t title_hits[] = { + { MCHT_NOWHERE, 0 }, + { MCHT_TITLEBTNPREV, 0 }, + { MCHT_TITLEMONTH, 1 }, + { MCHT_TITLEYEAR, 1 }, + { MCHT_TITLEBTNNEXT, 0 }, + { MCHT_NOWHERE, 0 } + }; + MCHITTESTINFO mchit; - UINT res; + UINT res, old_res; SYSTEMTIME st; LONG x; UINT title_index; HWND hwnd; RECT r; - static const UINT title_hits[] = - { MCHT_NOWHERE, MCHT_TITLEBK, MCHT_TITLEBTNPREV, MCHT_TITLEBK, - MCHT_TITLEMONTH, MCHT_TITLEBK, MCHT_TITLEYEAR, MCHT_TITLEBK, - MCHT_TITLEBTNNEXT, MCHT_TITLEBK, MCHT_NOWHERE }; memset(&mchit, 0, sizeof(MCHITTESTINFO)); @@ -914,7 +925,7 @@ static void test_monthcal_hittest(void) expect(0, mchit.pt.x); expect(0, mchit.pt.y); expect(mchit.uHit, res); - todo_wine expect_hex(MCHT_TITLE, res); + expect_hex(MCHT_TITLE, res); /* bottom right of the control and should not be active */ mchit.pt.x = r.right; @@ -950,7 +961,7 @@ static void test_monthcal_hittest(void) expect(r.right / 14, mchit.pt.x); expect(r.bottom / 2, mchit.pt.y); expect(mchit.uHit, res); - todo_wine expect_hex(MCHT_CALENDARDATE, res); + expect_hex(MCHT_CALENDARDATE, res); /* in active area - date from prev month */ mchit.pt.x = r.right / 14; /* half of first day rect */ @@ -959,7 +970,7 @@ static void test_monthcal_hittest(void) expect(r.right / 14, mchit.pt.x); expect(6 * r.bottom / 19, mchit.pt.y); expect(mchit.uHit, res); - todo_wine expect_hex(MCHT_CALENDARDATEPREV, res); + expect_hex(MCHT_CALENDARDATEPREV, res); #if 0 /* (125, 115) is in active area - date from this month */ @@ -1040,8 +1051,10 @@ static void test_monthcal_hittest(void) /* The horizontal position of title bar elements depends on locale (y pos is constant), so we sample across a horizontal line and make sure we find all elements. */ + mchit.pt.x = 0; mchit.pt.y = (5/2) * r.bottom / 19; title_index = 0; + old_res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); for (x = 0; x < r.right; x++){ mchit.pt.x = x; @@ -1049,13 +1062,21 @@ static void test_monthcal_hittest(void) expect(x, mchit.pt.x); expect((5/2) * r.bottom / 19, mchit.pt.y); expect(mchit.uHit, res); - if (res != title_hits[title_index]){ + + if (res != MCHT_TITLEBK && res != old_res) { title_index++; + old_res = res; + if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index) break; - todo_wine - expect_hex(title_hits[title_index], res); + if (title_hits[title_index].todo) { + todo_wine + ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n", + title_hits[title_index].ht, res, x); + } + else ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n", + title_hits[title_index].ht, res, x); } }
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Use a single calendar for hittesting tests, make point calculation at runtime.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 1f41db4c2fac11753fed12a2c88f3c5bd6c9ee3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f41db4c2fac11753fed12a2c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Sep 28 22:50:21 2009 +0400 comctl32/monthcal: Use a single calendar for hittesting tests, make point calculation at runtime. --- dlls/comctl32/tests/monthcal.c | 181 ++++++++++++++++++++++------------------ 1 files changed, 99 insertions(+), 82 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1f41db4c2fac11753fed1…
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Months popup menu should be placed at current pointer position.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 30010f44d5684fa5f628c77bd5c688802e01a3c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30010f44d5684fa5f628c77bd…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Sep 28 22:13:56 2009 +0400 comctl32/monthcal: Months popup menu should be placed at current pointer position. --- dlls/comctl32/monthcal.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index e5f5b44..62c8dc8 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1453,8 +1453,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+i, buf, countof(buf)); AppendMenuW(hMenu, MF_STRING|MF_ENABLED, i + 1, buf); } - menupoint.x = infoPtr->titlemonth.right; - menupoint.y = infoPtr->titlemonth.bottom; + menupoint.x = ht.pt.x; + menupoint.y = ht.pt.y; ClientToScreen(infoPtr->hwndSelf, &menupoint); i = TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON | TPM_RETURNCMD, menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL); @@ -1464,6 +1464,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) infoPtr->curSel.wMonth = i; InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); } + return 0; } case MCHT_TITLEYEAR: {
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Right button should trigger a popup menu on release.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: bce1cebdd4fca0857e689dbe33538047b1c613c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bce1cebdd4fca0857e689dbe3…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Sep 28 22:04:41 2009 +0400 comctl32/monthcal: Right button should trigger a popup menu on release. --- dlls/comctl32/monthcal.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 603e3e8..e5f5b44 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1336,7 +1336,7 @@ static void MONTHCAL_GoToPrevMonth(MONTHCAL_INFO *infoPtr) } static LRESULT -MONTHCAL_RButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam) +MONTHCAL_RButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam) { static const WCHAR todayW[] = { 'G','o',' ','t','o',' ','T','o','d','a','y',':',0 }; HMENU hMenu; @@ -2043,8 +2043,8 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_KILLFOCUS: return MONTHCAL_KillFocus(infoPtr, (HWND)wParam); - case WM_RBUTTONDOWN: - return MONTHCAL_RButtonDown(infoPtr, lParam); + case WM_RBUTTONUP: + return MONTHCAL_RButtonUp(infoPtr, lParam); case WM_LBUTTONDOWN: return MONTHCAL_LButtonDown(infoPtr, lParam);
1
0
0
0
Henri Verbeet : wined3d: Explicitly pass gl_info to stateblock_savedstates_copy().
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 49f712beff20371533a69a52594a6e8e59f90aa0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49f712beff20371533a69a525…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Sep 29 11:09:07 2009 +0200 wined3d: Explicitly pass gl_info to stateblock_savedstates_copy(). --- dlls/wined3d/stateblock.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index eaa3262..bd868d7 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -71,12 +71,10 @@ fail: return E_OUTOFMEMORY; } -/** Copy all members of one stateblock to another */ -static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES *dest, const SAVEDSTATES *source) +/* Copy all members of one stateblock to another */ +static void stateblock_savedstates_copy(SAVEDSTATES *dest, const SAVEDSTATES *source, + const struct wined3d_gl_info *gl_info) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - unsigned bsize = sizeof(BOOL); - /* Single values */ dest->primitive_type = source->primitive_type; dest->indices = source->indices; @@ -102,8 +100,10 @@ static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES * dest->vertexShaderConstantsI = source->vertexShaderConstantsI; /* Dynamically sized arrays */ - memcpy(dest->pixelShaderConstantsF, source->pixelShaderConstantsF, bsize * GL_LIMITS(pshader_constantsF)); - memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF, bsize * GL_LIMITS(vshader_constantsF)); + memcpy(dest->pixelShaderConstantsF, source->pixelShaderConstantsF, + sizeof(BOOL) * gl_info->max_pshader_constantsF); + memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF, + sizeof(BOOL) * gl_info->max_vshader_constantsF); } static inline void stateblock_set_bits(DWORD *map, UINT map_size) @@ -179,7 +179,7 @@ static void stateblock_copy(IWineD3DStateBlockImpl *dst, IWineD3DStateBlockImpl dst->blockType = src->blockType; /* Saved states */ - stateblock_savedstates_copy((IWineD3DStateBlock *)src, &dst->changed, &src->changed); + stateblock_savedstates_copy(&dst->changed, &src->changed, gl_info); /* Single items */ dst->gl_primitive_type = src->gl_primitive_type;
1
0
0
0
Henri Verbeet : wined3d: Pass IWineD3DStateBlockImpl pointers to stateblock_copy().
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 6d3e5a9cce5d57aea97963290c73e2cba511cc45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6d3e5a9cce5d57aea97963290…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Sep 29 11:09:06 2009 +0200 wined3d: Pass IWineD3DStateBlockImpl pointers to stateblock_copy(). --- dlls/wined3d/stateblock.c | 101 ++++++++++++++++++++++----------------------- 1 files changed, 49 insertions(+), 52 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 5692205..eaa3262 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -167,80 +167,77 @@ static void stateblock_savedstates_set(IWineD3DStateBlock *iface, SAVEDSTATES *s memset(states->vertexShaderConstantsF, value, bsize * GL_LIMITS(vshader_constantsF)); } -static void stateblock_copy(IWineD3DStateBlock *destination, IWineD3DStateBlock *source) +static void stateblock_copy(IWineD3DStateBlockImpl *dst, IWineD3DStateBlockImpl *src) { - int l; + const struct wined3d_gl_info *gl_info = &src->wineD3DDevice->adapter->gl_info; + unsigned int l; - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)source; - IWineD3DStateBlockImpl *Dest = (IWineD3DStateBlockImpl *)destination; - - /* IUnknown fields */ - Dest->lpVtbl = This->lpVtbl; - Dest->ref = This->ref; - - /* IWineD3DStateBlock information */ - Dest->parent = This->parent; - Dest->wineD3DDevice = This->wineD3DDevice; - Dest->blockType = This->blockType; + dst->lpVtbl = src->lpVtbl; + dst->ref = src->ref; + dst->parent = src->parent; + dst->wineD3DDevice = src->wineD3DDevice; + dst->blockType = src->blockType; /* Saved states */ - stateblock_savedstates_copy(source, &Dest->changed, &This->changed); + stateblock_savedstates_copy((IWineD3DStateBlock *)src, &dst->changed, &src->changed); /* Single items */ - Dest->gl_primitive_type = This->gl_primitive_type; - Dest->vertexDecl = This->vertexDecl; - Dest->vertexShader = This->vertexShader; - Dest->streamIsUP = This->streamIsUP; - Dest->pIndexData = This->pIndexData; - Dest->IndexFmt = This->IndexFmt; - Dest->baseVertexIndex = This->baseVertexIndex; - /* Dest->lights = This->lights; */ - Dest->clip_status = This->clip_status; - Dest->viewport = This->viewport; - Dest->material = This->material; - Dest->pixelShader = This->pixelShader; - Dest->scissorRect = This->scissorRect; + dst->gl_primitive_type = src->gl_primitive_type; + dst->vertexDecl = src->vertexDecl; + dst->vertexShader = src->vertexShader; + dst->streamIsUP = src->streamIsUP; + dst->pIndexData = src->pIndexData; + dst->IndexFmt = src->IndexFmt; + dst->baseVertexIndex = src->baseVertexIndex; + dst->clip_status = src->clip_status; + dst->viewport = src->viewport; + dst->material = src->material; + dst->pixelShader = src->pixelShader; + dst->scissorRect = src->scissorRect; /* Lights */ - memset(Dest->activeLights, 0, sizeof(Dest->activeLights)); - for(l = 0; l < LIGHTMAP_SIZE; l++) { + memset(dst->activeLights, 0, sizeof(dst->activeLights)); + for (l = 0; l < LIGHTMAP_SIZE; ++l) + { struct list *e1, *e2; - LIST_FOR_EACH_SAFE(e1, e2, &Dest->lightMap[l]) { + LIST_FOR_EACH_SAFE(e1, e2, &dst->lightMap[l]) + { PLIGHTINFOEL *light = LIST_ENTRY(e1, PLIGHTINFOEL, entry); list_remove(&light->entry); HeapFree(GetProcessHeap(), 0, light); } - LIST_FOR_EACH(e1, &This->lightMap[l]) { + LIST_FOR_EACH(e1, &src->lightMap[l]) + { PLIGHTINFOEL *light = LIST_ENTRY(e1, PLIGHTINFOEL, entry), *light2; light2 = HeapAlloc(GetProcessHeap(), 0, sizeof(*light)); *light2 = *light; - list_add_tail(&Dest->lightMap[l], &light2->entry); - if(light2->glIndex != -1) Dest->activeLights[light2->glIndex] = light2; + list_add_tail(&dst->lightMap[l], &light2->entry); + if (light2->glIndex != -1) dst->activeLights[light2->glIndex] = light2; } } /* Fixed size arrays */ - memcpy(Dest->vertexShaderConstantB, This->vertexShaderConstantB, sizeof(Dest->vertexShaderConstantB)); - memcpy(Dest->vertexShaderConstantI, This->vertexShaderConstantI, sizeof(Dest->vertexShaderConstantI)); - memcpy(Dest->pixelShaderConstantB, This->pixelShaderConstantB, sizeof(Dest->pixelShaderConstantB)); - memcpy(Dest->pixelShaderConstantI, This->pixelShaderConstantI, sizeof(Dest->pixelShaderConstantI)); - - memcpy(Dest->streamStride, This->streamStride, sizeof(Dest->streamStride)); - memcpy(Dest->streamOffset, This->streamOffset, sizeof(Dest->streamOffset)); - memcpy(Dest->streamSource, This->streamSource, sizeof(Dest->streamSource)); - memcpy(Dest->streamFreq, This->streamFreq, sizeof(Dest->streamFreq)); - memcpy(Dest->streamFlags, This->streamFlags, sizeof(Dest->streamFlags)); - memcpy(Dest->transforms, This->transforms, sizeof(Dest->transforms)); - memcpy(Dest->clipplane, This->clipplane, sizeof(Dest->clipplane)); - memcpy(Dest->renderState, This->renderState, sizeof(Dest->renderState)); - memcpy(Dest->textures, This->textures, sizeof(Dest->textures)); - memcpy(Dest->textureState, This->textureState, sizeof(Dest->textureState)); - memcpy(Dest->samplerState, This->samplerState, sizeof(Dest->samplerState)); + memcpy(dst->vertexShaderConstantB, src->vertexShaderConstantB, sizeof(dst->vertexShaderConstantB)); + memcpy(dst->vertexShaderConstantI, src->vertexShaderConstantI, sizeof(dst->vertexShaderConstantI)); + memcpy(dst->pixelShaderConstantB, src->pixelShaderConstantB, sizeof(dst->pixelShaderConstantB)); + memcpy(dst->pixelShaderConstantI, src->pixelShaderConstantI, sizeof(dst->pixelShaderConstantI)); + + memcpy(dst->streamStride, src->streamStride, sizeof(dst->streamStride)); + memcpy(dst->streamOffset, src->streamOffset, sizeof(dst->streamOffset)); + memcpy(dst->streamSource, src->streamSource, sizeof(dst->streamSource)); + memcpy(dst->streamFreq, src->streamFreq, sizeof(dst->streamFreq)); + memcpy(dst->streamFlags, src->streamFlags, sizeof(dst->streamFlags)); + memcpy(dst->transforms, src->transforms, sizeof(dst->transforms)); + memcpy(dst->clipplane, src->clipplane, sizeof(dst->clipplane)); + memcpy(dst->renderState, src->renderState, sizeof(dst->renderState)); + memcpy(dst->textures, src->textures, sizeof(dst->textures)); + memcpy(dst->textureState, src->textureState, sizeof(dst->textureState)); + memcpy(dst->samplerState, src->samplerState, sizeof(dst->samplerState)); /* Dynamically sized arrays */ - memcpy(Dest->vertexShaderConstantF, This->vertexShaderConstantF, sizeof(float) * GL_LIMITS(vshader_constantsF) * 4); - memcpy(Dest->pixelShaderConstantF, This->pixelShaderConstantF, sizeof(float) * GL_LIMITS(pshader_constantsF) * 4); + memcpy(dst->vertexShaderConstantF, src->vertexShaderConstantF, sizeof(float) * gl_info->max_vshader_constantsF * 4); + memcpy(dst->pixelShaderConstantF, src->pixelShaderConstantF, sizeof(float) * gl_info->max_pshader_constantsF * 4); } /********************************************************** @@ -1383,7 +1380,7 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl * if (type == WINED3DSBT_INIT || type == WINED3DSBT_RECORDED) return WINED3D_OK; /* Otherwise, might as well set the whole state block to the appropriate values */ - if (device->stateBlock) stateblock_copy((IWineD3DStateBlock *)stateblock, (IWineD3DStateBlock *)device->stateBlock); + if (device->stateBlock) stateblock_copy(stateblock, device->stateBlock); else memset(stateblock->streamFreq, 1, sizeof(stateblock->streamFreq)); /* Reset the ref and type after kludging it. */
1
0
0
0
Henri Verbeet : wined3d: Clear the correct "activeLights" array in stateblock_copy().
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 4ed126f5dcbdf99ba03c58e85023b44e8762e405 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ed126f5dcbdf99ba03c58e85…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Sep 29 11:09:05 2009 +0200 wined3d: Clear the correct "activeLights" array in stateblock_copy(). --- dlls/wined3d/stateblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 0cd3e43..5692205 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -202,7 +202,7 @@ static void stateblock_copy(IWineD3DStateBlock *destination, IWineD3DStateBlock Dest->scissorRect = This->scissorRect; /* Lights */ - memset(This->activeLights, 0, sizeof(This->activeLights)); + memset(Dest->activeLights, 0, sizeof(Dest->activeLights)); for(l = 0; l < LIGHTMAP_SIZE; l++) { struct list *e1, *e2; LIST_FOR_EACH_SAFE(e1, e2, &Dest->lightMap[l]) {
1
0
0
0
Henri Verbeet : wined3d: Add a separate function for state block initialization.
by Alexandre Julliard
29 Sep '09
29 Sep '09
Module: wine Branch: master Commit: 664057ce6aac3ef22be1ce57d27acb8a7367bd0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=664057ce6aac3ef22be1ce57d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Sep 29 11:09:04 2009 +0200 wined3d: Add a separate function for state block initialization. --- dlls/wined3d/device.c | 268 ++--------------------------------- dlls/wined3d/stateblock.c | 304 +++++++++++++++++++++++++++++++++++++++- dlls/wined3d/wined3d_private.h | 6 +- 3 files changed, 313 insertions(+), 265 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=664057ce6aac3ef22be1c…
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
87
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
Results per page:
10
25
50
100
200