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
March 2016
----- 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
2 participants
722 discussions
Start a n
N
ew thread
Miklós Máté : wined3d: Warn only once about unsupported wrap state.
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: e29aaca0185c71461ebd708c542a0e1afdef7201 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e29aaca0185c71461ebd708c5…
Author: Miklós Máté <mtmkls(a)gmail.com> Date: Mon Mar 14 13:40:57 2016 +0100 wined3d: Warn only once about unsupported wrap state. Signed-off-by: Miklós Máté <mtmkls(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index a819244..55e91c5 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1571,7 +1571,9 @@ void state_pointsprite(struct wined3d_context *context, const struct wined3d_sta static void state_wrap(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - if (state->render_states[WINED3D_RS_WRAP0] + static unsigned int once; + + if ((state->render_states[WINED3D_RS_WRAP0] || state->render_states[WINED3D_RS_WRAP1] || state->render_states[WINED3D_RS_WRAP2] || state->render_states[WINED3D_RS_WRAP3] @@ -1587,6 +1589,7 @@ static void state_wrap(struct wined3d_context *context, const struct wined3d_sta || state->render_states[WINED3D_RS_WRAP13] || state->render_states[WINED3D_RS_WRAP14] || state->render_states[WINED3D_RS_WRAP15]) + && !once++) FIXME("(WINED3D_RS_WRAP0) Texture wrapping not yet supported.\n"); }
1
0
0
0
Nikolay Sivov : xmllite/writer: Implement WriteComment().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: 41fcd1042e099e9de64a2d2dca2b4778c44678ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41fcd1042e099e9de64a2d2dc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 14 23:27:17 2016 +0300 xmllite/writer: Implement WriteComment(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/tests/writer.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ dlls/xmllite/writer.c | 46 +++++++++++++++++++++++++++++++--- 2 files changed, 103 insertions(+), 3 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 577b330..a55957e 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -755,6 +755,65 @@ static void test_writeenddocument(void) IStream_Release(stream); } +static void test_WriteComment(void) +{ + static const WCHAR closeW[] = {'-','-','>',0}; + static const WCHAR aW[] = {'a',0}; + static const WCHAR bW[] = {'b',0}; + IXmlWriter *writer; + IStream *stream; + HGLOBAL hglobal; + HRESULT hr; + char *ptr; + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = pCreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXmlWriter_SetProperty(writer, XmlWriterProperty_OmitXmlDeclaration, TRUE); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteComment(writer, aW); + ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); + + hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteComment(writer, aW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteComment(writer, aW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteComment(writer, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteComment(writer, closeW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetHGlobalFromStream(stream, &hglobal); + ok(hr == S_OK, "got 0x%08x\n", hr); + + ptr = GlobalLock(hglobal); + ok(ptr != NULL, "got %p\n", ptr); + ok(!strncmp(ptr, "<!--a--><b><!--a--><!----><!--- ->-->", 37), "got %s\n", ptr); + GlobalUnlock(hglobal); + + IXmlWriter_Release(writer); + IStream_Release(stream); +} + START_TEST(writer) { if (!init_pointers()) @@ -769,4 +828,5 @@ START_TEST(writer) test_omitxmldeclaration(); test_bom(); test_writeenddocument(); + test_WriteComment(); } diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index fa01553..766d335 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -43,6 +43,7 @@ static const WCHAR closeelementW[] = {'<','/'}; static const WCHAR closepiW[] = {'?','>'}; static const WCHAR ltW[] = {'<'}; static const WCHAR gtW[] = {'>'}; +static const WCHAR spaceW[] = {' '}; struct output_buffer { @@ -578,9 +579,49 @@ static HRESULT WINAPI xmlwriter_WriteChars(IXmlWriter *iface, const WCHAR *pwch, return E_NOTIMPL; } -static HRESULT WINAPI xmlwriter_WriteComment(IXmlWriter *iface, LPCWSTR pwszComment) +static HRESULT WINAPI xmlwriter_WriteComment(IXmlWriter *iface, LPCWSTR comment) { - return E_NOTIMPL; + static const WCHAR copenW[] = {'<','!','-','-'}; + static const WCHAR ccloseW[] = {'-','-','>'}; + xmlwriter *This = impl_from_IXmlWriter(iface); + + TRACE("%p %s\n", This, debugstr_w(comment)); + + switch (This->state) + { + case XmlWriterState_Initial: + return E_UNEXPECTED; + case XmlWriterState_ElemStarted: + writer_close_starttag(This); + break; + case XmlWriterState_DocClosed: + return WR_E_INVALIDACTION; + default: + ; + } + + write_output_buffer(This->output, copenW, ARRAY_SIZE(copenW)); + if (comment) { + int len = strlenW(comment), i; + + /* Make sure there's no two hyphen sequences in a string, space is used as a separator to produce compliant + comment string */ + if (len > 1) { + for (i = 0; i < len; i++) { + write_output_buffer(This->output, comment + i, 1); + if (comment[i] == '-' && (i + 1 < len) && comment[i+1] == '-') + write_output_buffer(This->output, spaceW, ARRAY_SIZE(spaceW)); + } + } + else + write_output_buffer(This->output, comment, len); + + if (len && comment[len-1] == '-') + write_output_buffer(This->output, spaceW, ARRAY_SIZE(spaceW)); + } + write_output_buffer(This->output, ccloseW, ARRAY_SIZE(ccloseW)); + + return S_OK; } static HRESULT WINAPI xmlwriter_WriteDocType(IXmlWriter *iface, LPCWSTR pwszName, LPCWSTR pwszPublicId, @@ -763,7 +804,6 @@ static HRESULT WINAPI xmlwriter_WriteProcessingInstruction(IXmlWriter *iface, LP xmlwriter *This = impl_from_IXmlWriter(iface); static const WCHAR xmlW[] = {'x','m','l',0}; static const WCHAR openpiW[] = {'<','?'}; - static const WCHAR spaceW[] = {' '}; TRACE("(%p)->(%s %s)\n", This, wine_dbgstr_w(name), wine_dbgstr_w(text));
1
0
0
0
Nikolay Sivov : comctl32/datetime: Use MCM_GETRANGE result directly in DTM_GETRANGE.
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: a62d17874423a13eb7a39edf71b9fcd549b85e4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a62d17874423a13eb7a39edf7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 14 20:19:26 2016 +0300 comctl32/datetime: Use MCM_GETRANGE result directly in DTM_GETRANGE. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/datetime.c | 4 +--- dlls/comctl32/tests/datetime.c | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 5c73a90..83db50e 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -1555,7 +1555,6 @@ static LRESULT WINAPI DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { DATETIME_INFO *infoPtr = ((DATETIME_INFO *)GetWindowLongPtrW (hwnd, 0)); - LRESULT ret; TRACE ("%x, %lx, %lx\n", uMsg, wParam, lParam); @@ -1571,8 +1570,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DATETIME_SetSystemTime (infoPtr, wParam, (SYSTEMTIME *) lParam); case DTM_GETRANGE: - ret = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, wParam, lParam); - return ret ? ret : 1; /* bug emulation */ + return SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, wParam, lParam); case DTM_SETRANGE: return SendMessageW (infoPtr->hMonthCal, MCM_SETRANGE, wParam, lParam); diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c index 61ecfb5..708921f 100644 --- a/dlls/comctl32/tests/datetime.c +++ b/dlls/comctl32/tests/datetime.c @@ -404,6 +404,13 @@ static void test_dtm_set_and_get_range(void) ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_range_seq, "test_dtm_set_and_get_range", FALSE); + /* DTM_SETRANGE with 0 flags */ + r = SendMessageA(hWnd, DTM_SETRANGE, 0, (LPARAM)st); + ok(r, "got %lu\n", r); + r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); + ok(r == 0, "got %lu\n", r); + ok(getSt[0].wYear == 0 && getSt[1].wYear == 0, "got %u, %u\n", getSt[0].wYear, getSt[1].wYear); + DestroyWindow(hWnd); }
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Always reset range flags and date limits on MCM_SETRANGE.
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: 68701440227f3230a18aad98217b771d22866bec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68701440227f3230a18aad982…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 14 20:19:25 2016 +0300 comctl32/monthcal: Always reset range flags and date limits on MCM_SETRANGE. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/monthcal.c | 3 +++ dlls/comctl32/tests/datetime.c | 4 +--- dlls/comctl32/tests/monthcal.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index c68a073..6cdcfca 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1452,6 +1452,9 @@ MONTHCAL_SetRange(MONTHCAL_INFO *infoPtr, SHORT limits, SYSTEMTIME *range) (limits & GDTR_MAX && !MONTHCAL_ValidateDate(&range[1]))) return FALSE; + infoPtr->rangeValid = 0; + infoPtr->minDate = infoPtr->maxDate = st_null; + if (limits & GDTR_MIN) { if (!MONTHCAL_ValidateTime(&range[0])) diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c index 195c719..61ecfb5 100644 --- a/dlls/comctl32/tests/datetime.c +++ b/dlls/comctl32/tests/datetime.c @@ -360,9 +360,7 @@ static void test_dtm_set_and_get_range(void) r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - todo_wine { - ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); - } + ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); expect_systime(&st[1], &getSt[1]); r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 792f66e..24dcdfc 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -262,6 +262,7 @@ static void test_monthcal(void) SYSTEMTIME st[2], st1[2], today; int res, month_range; DWORD limits; + BOOL r; hwnd = CreateWindowA(MONTHCAL_CLASSA, "MonthCal", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, 0, 300, 300, 0, 0, NULL, NULL); @@ -453,6 +454,40 @@ static void test_monthcal(void) expect(0, st1[1].wSecond); expect(0, st1[1].wMilliseconds); + /* 0 limit flags */ + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + + GetSystemTime(st); + st[1] = st[0]; + st[1].wYear++; + r = SendMessageA(hwnd, MCM_SETRANGE, 0, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st); + ok(limits == 0, "got 0x%08x\n", limits); + ok(st[0].wYear == 0 && st[1].wYear == 0, "got %u, %u\n", st[0].wYear, st[1].wYear); + + /* flags are 0, set min limit */ + GetSystemTime(st); + st[1] = st[0]; + st[1].wYear++; + + r = SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + ok(st1[1].wYear == 0, "got %u\n", st1[1].wYear); + + /* now set max limit, check flags */ + r = SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MAX, "got 0x%08x\n", limits); + ok(st1[0].wYear == 0, "got %u\n", st1[0].wYear); + DestroyWindow(hwnd); }
1
0
0
0
Andrew Eikum : dinput: Fix condition effect joystick offset calculation.
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: 99341249173710d5441ba3d415e53aeb37b91fd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99341249173710d5441ba3d41…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 14 11:39:48 2016 -0500 dinput: Fix condition effect joystick offset calculation. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/effect_linuxinput.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 3f17217..0e7be2c 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -67,6 +67,11 @@ static inline LinuxInputEffectImpl *impl_from_IDirectInputEffect(IDirectInputEff return CONTAINING_RECORD(iface, LinuxInputEffectImpl, IDirectInputEffect_iface); } +double ff_effect_direction_to_rad(unsigned int dir) +{ + return (dir & 0xffff) * M_PI / 0x8000; +} + /****************************************************************************** * LinuxInputEffectImpl */ @@ -172,8 +177,10 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters( return diErr; else { if (peff->dwFlags & DIEFF_CARTESIAN) { - peff->rglDirection[0] = sin(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000; - peff->rglDirection[1] = cos(M_PI * 3 * This->effect.direction / 0x7FFF) * 1000; + /* rotate so 0 points right */ + double angle = ff_effect_direction_to_rad(This->effect.direction + 0xc000); + peff->rglDirection[0] = sin(angle) * 1000; + peff->rglDirection[1] = -cos(angle) * 1000; } else { /* Polar and spherical coordinates are the same for two or less * axes. @@ -505,9 +512,11 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( /* One condition block. This needs to be rotated to direction, * and expanded to separate x and y conditions. */ int i; - double factor[2]; - factor[0] = asin((This->effect.direction * 3.0 * M_PI) / 0x7FFF); - factor[1] = acos((This->effect.direction * 3.0 * M_PI) / 0x7FFF); + double factor[2], angle; + /* rotate so 0 points right */ + angle = ff_effect_direction_to_rad(This->effect.direction + 0xc000); + factor[0] = sin(angle); + factor[1] = -cos(angle); for (i = 0; i < 2; ++i) { This->effect.u.condition[i].center = (int)(factor[i] * (tsp->lOffset / 10) * 32); This->effect.u.condition[i].right_coeff = (int)(factor[i] * (tsp->lPositiveCoefficient / 10) * 32);
1
0
0
0
Stefan Dösinger : wined3d: Merge wined3d_surface_update_desc() into wined3d_texture_update_desc().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: 2efaddc74ee86a1a3d4b799b00ea12e260003e40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2efaddc74ee86a1a3d4b799b0…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Mar 14 17:02:18 2016 +0100 wined3d: Merge wined3d_surface_update_desc() into wined3d_texture_update_desc(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 79 ------------------------------------------ dlls/wined3d/texture.c | 75 ++++++++++++++++++++++++++++++++++----- dlls/wined3d/wined3d_private.h | 2 -- 3 files changed, 67 insertions(+), 89 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 64ed04a..f7ca370 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1677,85 +1677,6 @@ static inline unsigned short float_32_to_16(const float *in) return ret; } -HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) -{ - struct wined3d_resource *texture_resource = &surface->container->resource; - unsigned int width, height; - BOOL create_dib = FALSE; - DWORD valid_location = 0; - HRESULT hr; - - if (surface->flags & SFLAG_DIBSECTION) - { - DeleteDC(surface->hDC); - DeleteObject(surface->dib.DIBsection); - surface->dib.bitmap_data = NULL; - surface->flags &= ~SFLAG_DIBSECTION; - create_dib = TRUE; - } - - surface->locations = 0; - wined3d_resource_free_sysmem(&surface->resource); - - width = texture_resource->width; - height = texture_resource->height; - surface->resource.width = width; - surface->resource.height = height; - if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[ARB_TEXTURE_RECTANGLE] - || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) - { - surface->pow2Width = width; - surface->pow2Height = height; - } - else - { - surface->pow2Width = surface->pow2Height = 1; - while (surface->pow2Width < width) - surface->pow2Width <<= 1; - while (surface->pow2Height < height) - surface->pow2Height <<= 1; - } - - if (surface->container->user_memory) - { - surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY; - valid_location = WINED3D_LOCATION_USER_MEMORY; - } - surface->resource.format = texture_resource->format; - surface->resource.multisample_type = texture_resource->multisample_type; - surface->resource.multisample_quality = texture_resource->multisample_quality; - surface->resource.size = surface->container->slice_pitch; - - /* The format might be changed to a format that needs conversion. - * If the surface didn't use PBOs previously but could now, don't - * change it - whatever made us not use PBOs might come back, e.g. - * color keys. */ - if (surface->resource.map_binding == WINED3D_LOCATION_BUFFER - && !wined3d_texture_use_pbo(surface->container, gl_info)) - surface->resource.map_binding = create_dib ? WINED3D_LOCATION_DIB : WINED3D_LOCATION_SYSMEM; - - if (create_dib) - { - if (FAILED(hr = surface_create_dib_section(surface))) - { - ERR("Failed to create dib section, hr %#x.\n", hr); - return hr; - } - if (!valid_location) - valid_location = WINED3D_LOCATION_DIB; - } - - if (!valid_location) - { - surface_prepare_system_memory(surface); - valid_location = WINED3D_LOCATION_SYSMEM; - } - - surface_validate_location(surface, valid_location); - - return WINED3D_OK; -} - static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) { diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index c86d640..cdde12c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -670,6 +670,8 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); UINT resource_size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, 1); struct wined3d_surface *surface; + DWORD valid_location = 0; + BOOL create_dib = FALSE; TRACE("texture %p, width %u, height %u, format %s, multisample_type %#x, multisample_quality %u, " "mem %p, pitch %u.\n", @@ -713,13 +715,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT if (device->d3d_initialized) texture->resource.resource_ops->resource_unload(&texture->resource); - texture->resource.format = format; - texture->resource.multisample_type = multisample_type; - texture->resource.multisample_quality = multisample_quality; - texture->resource.width = width; - texture->resource.height = height; + if (surface->flags & SFLAG_DIBSECTION) + { + DeleteDC(surface->hDC); + surface->hDC = NULL; + DeleteObject(surface->dib.DIBsection); + surface->dib.DIBsection = NULL; + surface->dib.bitmap_data = NULL; + surface->flags &= ~SFLAG_DIBSECTION; + create_dib = TRUE; + } + + wined3d_resource_free_sysmem(&surface->resource); - texture->user_memory = mem; if ((texture->row_pitch = pitch)) texture->slice_pitch = height * pitch; else @@ -727,12 +735,63 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT wined3d_format_calculate_pitch(format, 1, width, height, &texture->row_pitch, &texture->slice_pitch); - texture->flags &= ~WINED3D_TEXTURE_COND_NP2_EMULATED; + texture->resource.format = format; + texture->resource.multisample_type = multisample_type; + texture->resource.multisample_quality = multisample_quality; + texture->resource.width = width; + texture->resource.height = height; + + surface->resource.format = format; + surface->resource.multisample_type = multisample_type; + surface->resource.multisample_quality = multisample_quality; + surface->resource.width = width; + surface->resource.height = height; + surface->resource.size = texture->slice_pitch; + if (((width & (width - 1)) || (height & (height - 1))) && !gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] && !gl_info->supported[ARB_TEXTURE_RECTANGLE] && !gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) + { texture->flags |= WINED3D_TEXTURE_COND_NP2_EMULATED; + surface->pow2Width = surface->pow2Height = 1; + while (surface->pow2Width < width) + surface->pow2Width <<= 1; + while (surface->pow2Height < height) + surface->pow2Height <<= 1; + } + else + { + texture->flags &= ~WINED3D_TEXTURE_COND_NP2_EMULATED; + surface->pow2Width = width; + surface->pow2Height = height; + } + + surface->locations = 0; + + if ((texture->user_memory = mem)) + { + surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY; + valid_location = WINED3D_LOCATION_USER_MEMORY; + } + else if (create_dib && SUCCEEDED(surface_create_dib_section(surface))) + { + valid_location = WINED3D_LOCATION_DIB; + } + else + { + wined3d_surface_prepare(surface, NULL, WINED3D_LOCATION_SYSMEM); + valid_location = WINED3D_LOCATION_SYSMEM; + } + + /* The format might be changed to a format that needs conversion. + * If the surface didn't use PBOs previously but could now, don't + * change it - whatever made us not use PBOs might come back, e.g. + * color keys. */ + if (surface->resource.map_binding == WINED3D_LOCATION_BUFFER && !wined3d_texture_use_pbo(texture, gl_info)) + surface->resource.map_binding = surface->dib.DIBsection ? WINED3D_LOCATION_DIB : WINED3D_LOCATION_SYSMEM; - return wined3d_surface_update_desc(surface, gl_info); + surface_validate_location(surface, valid_location); + + return WINED3D_OK; } /* Context activation is done by the caller. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 15fe6c9..df16d63 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2623,8 +2623,6 @@ void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, void surface_set_dirty(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_set_texture_target(struct wined3d_surface *surface, GLenum target, GLint level) DECLSPEC_HIDDEN; void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN; -HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, - const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; void surface_validate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
1
0
0
0
Stefan Dösinger : wined3d: Introduce wined3d_texture_use_pbo().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: bad48492574045c3fbdb233ec667cfa9ba678153 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bad48492574045c3fbdb233ec…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Mar 14 17:02:17 2016 +0100 wined3d: Introduce wined3d_texture_use_pbo(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 18 +++--------------- dlls/wined3d/texture.c | 11 +++++++++++ dlls/wined3d/volume.c | 4 +--- dlls/wined3d/wined3d_private.h | 2 ++ 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d06f1eb..64ed04a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -518,19 +518,6 @@ static void surface_evict_sysmem(struct wined3d_surface *surface) surface_invalidate_location(surface, WINED3D_LOCATION_SYSMEM); } -static BOOL surface_use_pbo(const struct wined3d_surface *surface) -{ - const struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info; - struct wined3d_texture *texture = surface->container; - - return texture->resource.pool == WINED3D_POOL_DEFAULT - && surface->resource.access_flags & WINED3D_RESOURCE_ACCESS_CPU - && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] - && !texture->resource.format->convert - && !(texture->flags & WINED3D_TEXTURE_PIN_SYSMEM) - && !(texture->flags & WINED3D_TEXTURE_COND_NP2_EMULATED); -} - static HRESULT surface_private_setup(struct wined3d_surface *surface) { /* TODO: Check against the maximum texture sizes supported by the video card. */ @@ -597,7 +584,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface) if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) surface->locations = WINED3D_LOCATION_DISCARDED; - if (surface_use_pbo(surface)) + if (wined3d_texture_use_pbo(texture, gl_info)) surface->resource.map_binding = WINED3D_LOCATION_BUFFER; return WINED3D_OK; @@ -1743,7 +1730,8 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struc * If the surface didn't use PBOs previously but could now, don't * change it - whatever made us not use PBOs might come back, e.g. * color keys. */ - if (surface->resource.map_binding == WINED3D_LOCATION_BUFFER && !surface_use_pbo(surface)) + if (surface->resource.map_binding == WINED3D_LOCATION_BUFFER + && !wined3d_texture_use_pbo(surface->container, gl_info)) surface->resource.map_binding = create_dib ? WINED3D_LOCATION_DIB : WINED3D_LOCATION_SYSMEM; if (create_dib) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index e0b5510..c86d640 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -28,6 +28,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); WINE_DECLARE_DEBUG_CHANNEL(winediag); +BOOL wined3d_texture_use_pbo(const struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info) +{ + return texture->resource.pool == WINED3D_POOL_DEFAULT + && texture->resource.access_flags & WINED3D_RESOURCE_ACCESS_CPU + && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] + && !texture->resource.format->convert + && !(texture->flags & (WINED3D_TEXTURE_PIN_SYSMEM | WINED3D_TEXTURE_COND_NP2_EMULATED)); +} + static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struct wined3d_texture_ops *texture_ops, UINT layer_count, UINT level_count, const struct wined3d_resource_desc *desc, DWORD flags, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops, @@ -61,6 +70,8 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc return hr; } wined3d_resource_update_draw_binding(&texture->resource); + if ((flags & WINED3D_TEXTURE_CREATE_MAPPABLE) || desc->format == WINED3DFMT_D16_LOCKABLE) + texture->resource.access_flags |= WINED3D_RESOURCE_ACCESS_CPU; texture->texture_ops = texture_ops; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index e1749ac..c846ec4 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -489,9 +489,7 @@ HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_textur volume->texture_level = level; volume->locations = WINED3D_LOCATION_DISCARDED; - if (desc->pool == WINED3D_POOL_DEFAULT && desc->usage & WINED3DUSAGE_DYNAMIC - && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] - && !format->convert) + if (wined3d_texture_use_pbo(container, gl_info)) { wined3d_resource_free_sysmem(&volume->resource); volume->resource.map_binding = WINED3D_LOCATION_BUFFER; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 83a9d04..15fe6c9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2458,6 +2458,8 @@ void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture, void wined3d_texture_set_dirty(struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; +BOOL wined3d_texture_use_pbo(const struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; #define WINED3D_LOCATION_DISCARDED 0x00000001 #define WINED3D_LOCATION_SYSMEM 0x00000002
1
0
0
0
Henri Verbeet : wined3d: Get resource info from the texture in surface_convert_depth_to_float().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: ef8162751eb03ef6a4abb54bd908fa9893025a41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef8162751eb03ef6a4abb54bd…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 14 17:02:16 2016 +0100 wined3d: Get resource info from the texture in surface_convert_depth_to_float(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 3f90592..d06f1eb 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -884,7 +884,7 @@ static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined static BOOL surface_convert_depth_to_float(const struct wined3d_surface *surface, DWORD depth, float *float_depth) { - const struct wined3d_format *format = surface->resource.format; + const struct wined3d_format *format = surface->container->resource.format; switch (format->id) {
1
0
0
0
Henri Verbeet : wined3d: Get resource info from the texture in surface_blt_fbo().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: f04448500d0c019f07cae48ae6a5d52e0649e235 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f04448500d0c019f07cae48ae…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 14 17:02:15 2016 +0100 wined3d: Get resource info from the texture in surface_blt_fbo(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 110344c..3f90592 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -745,7 +745,7 @@ static void surface_blt_fbo(const struct wined3d_device *device, /* Resolve the source surface first if needed. */ if (src_location == WINED3D_LOCATION_RB_MULTISAMPLE - && (src_surface->resource.format->id != dst_surface->resource.format->id + && (src_surface->container->resource.format->id != dst_surface->container->resource.format->id || abs(src_rect.bottom - src_rect.top) != abs(dst_rect.bottom - dst_rect.top) || abs(src_rect.right - src_rect.left) != abs(dst_rect.right - dst_rect.left))) src_location = WINED3D_LOCATION_RB_RESOLVED;
1
0
0
0
Henri Verbeet : wined3d: Get resource info from the texture in surface_depth_blt_fbo().
by Alexandre Julliard
15 Mar '16
15 Mar '16
Module: wine Branch: master Commit: 77aa34099cfca74c11441909d074d1a01795db49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77aa34099cfca74c11441909d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 14 17:02:14 2016 +0100 wined3d: Get resource info from the texture in surface_depth_blt_fbo(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 99a2649..110344c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -633,15 +633,15 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device, if (src_mask != dst_mask) { ERR("Incompatible formats %s and %s.\n", - debug_d3dformat(src_surface->resource.format->id), - debug_d3dformat(dst_surface->resource.format->id)); + debug_d3dformat(src_surface->container->resource.format->id), + debug_d3dformat(dst_surface->container->resource.format->id)); return; } if (!src_mask) { ERR("Not a depth / stencil format: %s.\n", - debug_d3dformat(src_surface->resource.format->id)); + debug_d3dformat(src_surface->container->resource.format->id)); return; }
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
73
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
Results per page:
10
25
50
100
200