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
April 2020
----- 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
1016 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Fix _putws implementation.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: bf8638c41b87472d39893a9f53ba2e5ddeee5690 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf8638c41b87472d39893a9f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Sep 30 15:22:15 2019 +0200 msvcrt: Fix _putws implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47615
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 3577f06f719e854513d1015f33aa78c506ad3f32) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/file.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index e06bb0076d..1a1945f879 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4834,19 +4834,14 @@ int CDECL MSVCRT_puts(const char *s) */ int CDECL MSVCRT__putws(const MSVCRT_wchar_t *s) { - static const MSVCRT_wchar_t nl = '\n'; - MSVCRT_size_t len = strlenW(s); int ret; MSVCRT__lock_file(MSVCRT_stdout); - if(MSVCRT__fwrite_nolock(s, sizeof(*s), len, MSVCRT_stdout) != len) { - MSVCRT__unlock_file(MSVCRT_stdout); - return MSVCRT_EOF; - } - - ret = MSVCRT__fwrite_nolock(&nl,sizeof(nl),1,MSVCRT_stdout) == 1 ? 0 : MSVCRT_EOF; + ret = MSVCRT_fputws(s, MSVCRT_stdout); + if(ret >= 0) + ret = MSVCRT__fputwc_nolock('\n', MSVCRT_stdout); MSVCRT__unlock_file(MSVCRT_stdout); - return ret; + return ret >= 0 ? 0 : MSVCRT_WEOF; } /*********************************************************************
1
0
0
0
Paul Gofman : wined3d: Allow loading buffers mapped through system memory.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: fbe718f24ce82b804325a999866bf027844ad4eb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fbe718f24ce82b804325a999…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Mon Sep 23 17:00:30 2019 +0300 wined3d: Allow loading buffers mapped through system memory. Fixes rendering dirt on the wind shield and GL_INVALID_OPERATION errors in "Need For Speed Shift 2". The test succeeds on Windows with retail Direct3D 9, but fails with debug Direct3D 9 if selected in DirectX SDK control panel: error code is returned from _DrawIndexedPrimitive() and the triangle is not rendered. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit df509be8c6d581b2e68ea79c282289dd8840b11a) Conflicts: dlls/d3d9/tests/visual.c Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3d9/tests/visual.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/buffer.c | 8 ++- 2 files changed, 146 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index bbdc945dfe..75b37872e3 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -24730,6 +24730,145 @@ static void test_sysmem_draw(void) DestroyWindow(window); } +static void test_draw_mapped_buffer(void) +{ + IDirect3DVertexBuffer9 *vb; + IDirect3DIndexBuffer9 *ib; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + unsigned int i; + D3DCOLOR color; + ULONG refcount; + BOOL test_pass; + HWND window; + HRESULT hr; + void *data; + + static const short indices[] = {0, 1, 2}; + static const struct + { + struct vec3 position; + DWORD diffuse; + } + quad[] = + { + {{-1.0f, -1.0f, 0.1f}, 0xffff0000}, + {{-1.0f, 1.0f, 0.1f}, 0xffff0000}, + {{ 1.0f, 1.0f, 0.1f}, 0xffff0000}, + }; + static const struct + { + D3DPOOL pool; + DWORD usage; + BOOL ignore_wine_result; + } + tests[] = + { + {D3DPOOL_DEFAULT, D3DUSAGE_DYNAMIC, TRUE}, + {D3DPOOL_MANAGED, 0}, + {D3DPOOL_SYSTEMMEM, 0}, + }; + + window = create_window(); + ok(!!window, "Failed to create a window.\n"); + + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + IDirect3D9_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_CreateIndexBuffer(device, sizeof(indices), 0, + D3DFMT_INDEX16, D3DPOOL_DEFAULT, &ib, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DIndexBuffer9_Lock(ib, 0, sizeof(indices), &data, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + memcpy(data, indices, sizeof(indices)); + + hr = IDirect3DDevice9_SetIndices(device, ib); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), tests[i].usage, + D3DFVF_XYZ | D3DFVF_DIFFUSE, tests[i].pool, &vb, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), &data, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + memcpy(data, quad, sizeof(quad)); + + hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad[0])); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 0, ARRAY_SIZE(quad), 0, 1); + ok(hr == D3D_OK, "Got unexpected hr %#x, test %u.\n", hr, i); + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + color = getPixelColor(device, 160, 120); + ok(color_match(color, 0x00ff0000, 1), "Got unexpected color 0x%08x, test %u.\n", color, i); + color = getPixelColor(device, 480, 360); + ok(color_match(color, 0x000000ff, 1), "Got unexpected color 0x%08x, test %u.\n", color, i); + + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DVertexBuffer9_Unlock(vb); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + /* One more time now when buffer object in wined3d is already created. */ + hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), &data, D3DLOCK_DISCARD); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + memcpy(data, quad, sizeof(quad)); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 0, ARRAY_SIZE(quad), 0, 1); + ok(hr == D3D_OK, "Got unexpected hr %#x, test %u.\n", hr, i); + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + color = getPixelColor(device, 160, 120); + + test_pass = color_match(color, 0x00ff0000, 1); + todo_wine_if(tests[i].ignore_wine_result && !test_pass) + ok(test_pass, "Got unexpected color 0x%08x, test %u.\n", color, i); + + color = getPixelColor(device, 480, 360); + ok(color_match(color, 0x000000ff, 1), "Got unexpected color 0x%08x, test %u.\n", color, i); + + hr = IDirect3DVertexBuffer9_Unlock(vb); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DVertexBuffer9_Release(vb); + } + + hr = IDirect3DIndexBuffer9_Unlock(ib); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + IDirect3DIndexBuffer9_Release(ib); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + + START_TEST(visual) { D3DADAPTER_IDENTIFIER9 identifier; @@ -24870,4 +25009,5 @@ START_TEST(visual) test_map_synchronisation(); test_color_vertex(); test_sysmem_draw(); + test_draw_mapped_buffer(); } diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 020116da7f..27cae257a4 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -897,11 +897,15 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * TRACE("buffer %p.\n", buffer); - if (buffer->resource.map_count) + if (buffer->resource.map_count && buffer->map_ptr) { - WARN("Buffer is mapped, skipping preload.\n"); + FIXME("Buffer is mapped through buffer object, not loading.\n"); return; } + else if (buffer->resource.map_count) + { + WARN("Loading mapped buffer.\n"); + } buffer_mark_used(buffer);
1
0
0
0
Gijs Vermeulen : msvcrt: Add Concurrency::details::_Context::_Yield stub.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: e6b07d21591b249908e0d3055bc3248fa0349dc3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6b07d21591b249908e0d305…
Author: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Date: Wed Oct 16 22:54:18 2019 +0200 msvcrt: Add Concurrency::details::_Context::_Yield stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46279
Signed-off-by: Gijs Vermeulen <gijsvrm(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 170ab94bdebb0b8081b32ff908bfa215140c131a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/concrt140/concrt140.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/scheduler.c | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 4ba1825715..9cb02c97a1 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -468,7 +468,7 @@ @ stub -arch=win64 ?_TryAcquireWrite@_ReaderWriterLock@details@Concurrency@@QEAA_NXZ @ stub ?_UnderlyingYield@details@Concurrency@@YAXXZ @ cdecl ?_Value@_SpinCount@details@Concurrency@@SAIXZ() msvcr120.?_Value@_SpinCount@details@Concurrency@@SAIXZ -@ stub ?_Yield@_Context@details@Concurrency@@SAXXZ +@ cdecl ?_Yield@_Context@details@Concurrency@@SAXXZ() msvcr120.?_Yield@_Context@details@Concurrency@@SAXXZ @ stub -arch=i386 ?cancel@agent@Concurrency@@QAE_NXZ @ stub -arch=win64 ?cancel@agent@Concurrency@@QEAA_NXZ @ stub ?current@location@Concurrency@@SA?AV12@XZ diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index fe2c3a00d8..558e22c6c8 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -685,7 +685,7 @@ @ stub -arch=win32 ?_ValidateWrite@@YAHPAXI@Z @ stub -arch=win64 ?_ValidateWrite@@YAHPEAXI@Z @ cdecl ?_Value@_SpinCount@details@Concurrency@@SAIXZ() SpinCount__Value -@ stub ?_Yield@_Context@details@Concurrency@@SAXXZ +@ cdecl ?_Yield@_Context@details@Concurrency@@SAXXZ() Context_Yield @ cdecl -arch=win32 ?__ExceptionPtrAssign@@YAXPAXPBX@Z(ptr ptr) __ExceptionPtrAssign @ cdecl -arch=win64 ?__ExceptionPtrAssign@@YAXPEAXPEBX@Z(ptr ptr) __ExceptionPtrAssign @ cdecl -arch=win32 ?__ExceptionPtrCompare@@YA_NPBX0@Z(ptr ptr) __ExceptionPtrCompare diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index f8a3d10079..9bd6c87734 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -667,7 +667,7 @@ @ stub -arch=win32 ?_ValidateWrite@@YAHPAXI@Z @ stub -arch=win64 ?_ValidateWrite@@YAHPEAXI@Z @ cdecl ?_Value@_SpinCount@details@Concurrency@@SAIXZ() SpinCount__Value -@ stub ?_Yield@_Context@details@Concurrency@@SAXXZ +@ cdecl ?_Yield@_Context@details@Concurrency@@SAXXZ() Context_Yield @ cdecl -arch=win32 ?__ExceptionPtrAssign@@YAXPAXPBX@Z(ptr ptr) __ExceptionPtrAssign @ cdecl -arch=win64 ?__ExceptionPtrAssign@@YAXPEAXPEBX@Z(ptr ptr) __ExceptionPtrAssign @ cdecl -arch=win32 ?__ExceptionPtrCompare@@YA_NPBX0@Z(ptr ptr) __ExceptionPtrCompare diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 71528bd87d..836a852875 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -663,7 +663,7 @@ @ stub -arch=win32 ?_ValidateWrite@@YAHPAXI@Z @ stub -arch=win64 ?_ValidateWrite@@YAHPEAXI@Z @ cdecl ?_Value@_SpinCount@details@Concurrency@@SAIXZ() msvcr120.?_Value@_SpinCount@details@Concurrency@@SAIXZ -@ stub ?_Yield@_Context@details@Concurrency@@SAXXZ +@ cdecl ?_Yield@_Context@details@Concurrency@@SAXXZ() msvcr120.?_Yield@_Context@details@Concurrency@@SAXXZ @ cdecl -arch=win32 ?__ExceptionPtrAssign@@YAXPAXPBX@Z(ptr ptr) msvcr120.?__ExceptionPtrAssign@@YAXPAXPBX@Z @ cdecl -arch=win64 ?__ExceptionPtrAssign@@YAXPEAXPEBX@Z(ptr ptr) msvcr120.?__ExceptionPtrAssign@@YAXPEAXPEBX@Z @ cdecl -arch=win32 ?__ExceptionPtrCompare@@YA_NPBX0@Z(ptr ptr) msvcr120.?__ExceptionPtrCompare@@YA_NPBX0@Z diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 55ab1c549e..dddbcf81df 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -263,6 +263,7 @@ void __cdecl Context_Block(void) } /* ?Yield@Context@Concurrency@@SAXXZ */ +/* ?_Yield@_Context@details@Concurrency@@SAXXZ */ void __cdecl Context_Yield(void) { FIXME("()\n");
1
0
0
0
Zebediah Figura : winex11: Track the client colormap separately.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: cd13f18f1181947be52223808433f3c79c82a4e1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd13f18f1181947be5222380…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Sep 18 21:44:19 2019 -0500 winex11: Track the client colormap separately. If a window with an OpenGL surface attached is reparented as a child window, and then reparented as a top-level window, so that its whole window is destroyed and then recreated, it will be recreated with the colormap of its child window, which more than likely has a different visual. This violates the X11 specification, which states that a window's colormap must have the same visual as the window itself, and causes the X server to return BadMatch to the CreateWindow request. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 22993aff94ad4b3539ed99648f8180cfc7b9253c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winex11.drv/window.c | 21 +++++++++++---------- dlls/winex11.drv/x11drv.h | 3 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 7589b3228e..04576e500a 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -313,7 +313,7 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data, static int get_window_attributes( struct x11drv_win_data *data, XSetWindowAttributes *attr ) { attr->override_redirect = !data->managed; - attr->colormap = data->colormap ? data->colormap : default_colormap; + attr->colormap = data->whole_colormap ? data->whole_colormap : default_colormap; attr->save_under = ((GetClassLongW( data->hwnd, GCL_STYLE ) & CS_SAVEBITS) != 0); attr->bit_gravity = NorthWestGravity; attr->backing_store = NotUseful; @@ -1444,12 +1444,12 @@ Window create_client_window( HWND hwnd, const XVisualInfo *visual ) TRACE( "%p reparent xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window ); } - if (data->colormap) XFreeColormap( gdi_display, data->colormap ); - data->colormap = XCreateColormap( gdi_display, dummy_parent, visual->visual, - (visual->class == PseudoColor || - visual->class == GrayScale || - visual->class == DirectColor) ? AllocAll : AllocNone ); - attr.colormap = data->colormap; + if (data->client_colormap) XFreeColormap( gdi_display, data->client_colormap ); + data->client_colormap = XCreateColormap( gdi_display, dummy_parent, visual->visual, + (visual->class == PseudoColor || + visual->class == GrayScale || + visual->class == DirectColor) ? AllocAll : AllocNone ); + attr.colormap = data->client_colormap; attr.bit_gravity = NorthWestGravity; attr.win_gravity = NorthWestGravity; attr.backing_store = NotUseful; @@ -1508,7 +1508,7 @@ static void create_whole_window( struct x11drv_win_data *data ) data->shaped = (win_rgn != 0); if (data->vis.visualid != default_visual.visualid) - data->colormap = XCreateColormap( data->display, root_window, data->vis.visual, AllocNone ); + data->whole_colormap = XCreateColormap( data->display, root_window, data->vis.visual, AllocNone ); mask = get_window_attributes( data, &attr ); @@ -1585,9 +1585,9 @@ static void destroy_whole_window( struct x11drv_win_data *data, BOOL already_des XDeleteContext( data->display, data->whole_window, winContext ); if (!already_destroyed) XDestroyWindow( data->display, data->whole_window ); } - if (data->colormap) XFreeColormap( data->display, data->colormap ); + if (data->whole_colormap) XFreeColormap( data->display, data->whole_colormap ); data->whole_window = data->client_window = 0; - data->colormap = 0; + data->whole_colormap = 0; data->wm_state = WithdrawnState; data->net_wm_state = 0; data->mapped = FALSE; @@ -1693,6 +1693,7 @@ void CDECL X11DRV_DestroyWindow( HWND hwnd ) if (thread_data->last_xic_hwnd == hwnd) thread_data->last_xic_hwnd = 0; if (data->icon_pixmap) XFreePixmap( gdi_display, data->icon_pixmap ); if (data->icon_mask) XFreePixmap( gdi_display, data->icon_mask ); + if (data->client_colormap) XFreeColormap( data->display, data->client_colormap ); HeapFree( GetProcessHeap(), 0, data->icon_bits ); XDeleteContext( gdi_display, (XID)hwnd, win_data_context ); release_win_data( data ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index a0308b0675..e6f4c2a8b9 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -552,7 +552,8 @@ struct x11drv_win_data { Display *display; /* display connection for the thread owning the window */ XVisualInfo vis; /* X visual used by this window */ - Colormap colormap; /* colormap if non-default visual */ + Colormap whole_colormap; /* colormap if non-default visual */ + Colormap client_colormap; /* colormap for the client window */ HWND hwnd; /* hwnd that this private data belongs to */ Window whole_window; /* X window for the complete window */ Window client_window; /* X window for the client area */
1
0
0
0
Matteo Bruni : d3dx9: Handle non-zero source rect position in D3DXLoadSurfaceFromMemory().
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: a709cfe061a53d55c43e81fc7a06c679309e825e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a709cfe061a53d55c43e81fc…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Sep 27 20:40:02 2019 +0200 d3dx9: Handle non-zero source rect position in D3DXLoadSurfaceFromMemory(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=41936
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 88d8ae383932ad1c292c74da7dcc19f00d8423f7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx9_36/surface.c | 3 +++ dlls/d3dx9_36/tests/surface.c | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index d921b89ab8..3f9e8d7979 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -1911,6 +1911,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, if (FAILED(hr = lock_surface(dst_surface, dst_rect, &lockrect, &surface, TRUE))) return hr; + src_memory = (BYTE *)src_memory + src_rect->top / srcformatdesc->block_height * src_pitch + + src_rect->left / srcformatdesc->block_width * srcformatdesc->block_byte_count; + if (src_format == surfdesc.Format && dst_size.width == src_size.width && dst_size.height == src_size.height diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index a844e52193..e60ab6712e 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -881,8 +881,19 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) check_release((IUnknown*)surf, 0); + SetRect(&rect, 1, 1, 2, 2); + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 1, 1, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, + D3DFMT_A8R8G8B8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); + check_pixel_4bpp(&lockrect, 0, 0, 0x8dc32bf6); + IDirect3DSurface9_UnlockRect(surf); + check_release((IUnknown *)surf, 0); /* test color conversion */ + SetRect(&rect, 0, 0, 2, 2); /* A8R8G8B8 */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL); if(FAILED(hr)) skip("Failed to create a surface (%#x)\n", hr);
1
0
0
0
Alistair Leslie-Hughes : dsound: Primary buffer doesn't support flag DSBCAPS_CTRLFX.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: 017a0173ac1b3032f46a6e9590be0392d04e43a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=017a0173ac1b3032f46a6e95…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Sep 27 03:46:55 2019 +0000 dsound: Primary buffer doesn't support flag DSBCAPS_CTRLFX. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=40740
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit eabb3d444c4cd78381a096665133e286e0805267) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dmime/performance.c | 1 + dlls/dsound/dsound.c | 6 ++++++ dlls/dsound/tests/dsound8.c | 50 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 6e4dae6be7..b7b4d01017 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -1064,6 +1064,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire /* Update description for creating primary buffer */ desc.dwFlags |= DSBCAPS_PRIMARYBUFFER; + desc.dwFlags &= ~DSBCAPS_CTRLFX; desc.dwBufferBytes = 0; desc.lpwfxFormat = NULL; diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 2fbb3ce40d..6437d090ac 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -449,6 +449,12 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( return DSERR_INVALIDPARAM; } + if (dsbd->dwFlags & DSBCAPS_CTRLFX) + { + WARN("Invalid parameter DSBCAPS_CTRLFX\n"); + return DSERR_INVALIDPARAM; + } + if (device->primary) { WARN("Primary Buffer already created\n"); IDirectSoundBuffer8_AddRef(&device->primary->IDirectSoundBuffer8_iface); diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index fabd8a037e..b6f8c60c7e 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -1173,6 +1173,55 @@ static void test_COM(void) while (IUnknown_Release(unk)); } +static void test_primary_flags(void) +{ + HRESULT rc; + IDirectSound8 *dso; + IDirectSoundBuffer *primary = NULL; + IDirectSoundFXI3DL2Reverb *reverb; + DSBUFFERDESC bufdesc; + DSCAPS dscaps; + + /* Create a DirectSound8 object */ + rc = pDirectSoundCreate8(NULL, &dso, NULL); + ok(rc == DS_OK || rc==DSERR_NODRIVER, "Failed: %08x\n",rc); + + if (rc!=DS_OK) + return; + + rc = IDirectSound8_SetCooperativeLevel(dso, get_hwnd(), DSSCL_PRIORITY); + ok(rc == DS_OK,"Failed: %08x\n", rc); + if (rc != DS_OK) { + IDirectSound8_Release(dso); + return; + } + + dscaps.dwSize = sizeof(dscaps); + rc = IDirectSound8_GetCaps(dso, &dscaps); + ok(rc == DS_OK,"Failed: %08x\n", rc); + trace("0x%x\n", dscaps.dwFlags); + + ZeroMemory(&bufdesc, sizeof(bufdesc)); + bufdesc.dwSize = sizeof(bufdesc); + bufdesc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLFX; + rc = IDirectSound8_CreateSoundBuffer(dso, &bufdesc, &primary, NULL); + ok(rc == E_INVALIDARG, "got %08x\n", rc); + + ZeroMemory(&bufdesc, sizeof(bufdesc)); + bufdesc.dwSize = sizeof(bufdesc); + bufdesc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRL3D; + rc = IDirectSound8_CreateSoundBuffer(dso, &bufdesc, &primary, NULL); + ok((rc == DS_OK && primary != NULL), "Failed to create a primary buffer: %08x\n", rc); + if (rc == DS_OK) { + rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundFXI3DL2Reverb, (LPVOID*)&reverb); + ok(rc==E_NOINTERFACE,"Failed: %08x\n", rc); + + IDirectSoundBuffer_Release(primary); + } + + IDirectSound8_Release(dso); +} + static void test_effects(void) { HRESULT rc; @@ -1396,6 +1445,7 @@ START_TEST(dsound8) dsound8_tests(); test_hw_buffers(); test_first_device(); + test_primary_flags(); test_effects(); } else
1
0
0
0
Michael Müller : wine.inf: Create the WindowsMediaVersion key and set its default value.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: 7b03029f7dd6b0d7b75e68649af81ca0b8df3923 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b03029f7dd6b0d7b75e6864…
Author: Michael Müller <michael(a)fds-team.de> Date: Thu Sep 19 18:36:40 2019 -0500 wine.inf: Create the WindowsMediaVersion key and set its default value. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47779
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit acd5358f5bb7c2dd491f7490849a410634971a3b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- loader/wine.inf.in | 1 + 1 file changed, 1 insertion(+) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index e7c49e70f1..bf2785b703 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -502,6 +502,7 @@ HKLM,%CurrentVersion%\PreviewHandlers,,16 HKLM,%CurrentVersion%\Run,,16 HKLM,%CurrentVersion%\Setup,"BootDir",,"%30%" HKLM,%CurrentVersion%\Setup,"SharedDir",,"%25%" +HKLM,%CurrentVersion%\Setup\WindowsFeatures\WindowsMediaVersion,,,"12.0.7601.18840" HKLM,%CurrentVersion%\Shell Extensions\Approved,,16 HKLM,%CurrentVersion%\Uninstall,,16 HKLM,%CurrentVersion%\Winlogon,,16
1
0
0
0
Zhiyi Zhang : kernelbase/tests: Add more PathAllocCanonicalize tests.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: 2f2ee0cde043175ca38780ebbea01f383d1301fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f2ee0cde043175ca38780eb…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Sep 19 12:04:57 2019 +0800 kernelbase/tests: Add more PathAllocCanonicalize tests. Contains tests added by Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 80fd28c7f22a1eb30dd0b8b681698716f43bba2f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernelbase/tests/path.c | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c index 7644c312b7..3ae4ac3b63 100644 --- a/dlls/kernelbase/tests/path.c +++ b/dlls/kernelbase/tests/path.c @@ -72,6 +72,7 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"\\\\?C:a", "\\\\?C:a", 0, S_OK}, /* No . */ + {"*", "*", 0, S_OK}, {"", "\\", 0, S_OK}, {"C:", "C:", 0, S_OK}, {"C:\\", "C:\\", 0, S_OK}, @@ -83,19 +84,41 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"..", "\\", 0, S_OK}, {"...", "\\", 0, S_OK}, {"*.", "*.", 0, S_OK}, + {"*.\\", "*.\\", 0, S_OK}, + {"*.\\", "*.\\", 0, S_OK}, {"*..", "*.", 0, S_OK}, + {"*..\\", "*..\\", 0, S_OK}, {"*...", "*.", 0, S_OK}, + {"*...\\", "*...\\", 0, S_OK}, + {"*....", "*.", 0, S_OK}, + {"*....\\", "*....\\", 0, S_OK}, + {".a", ".a", 0, S_OK}, + {".a\\", ".a\\", 0, S_OK}, {"a.", "a", 0, S_OK}, + {"a.\\", "a.\\", 0, S_OK}, + {".a.", ".a", 0, S_OK}, {"a.b", "a.b", 0, S_OK}, + {".a.b.", ".a.b", 0, S_OK}, {"a\\.", "a", 0, S_OK}, {"a\\.\\b", "a\\b", 0, S_OK}, + {"a\\.b", "a\\.b", 0, S_OK}, + {"a\\.b\\", "a\\.b\\", 0, S_OK}, + {":.", ":", 0, S_OK}, + {"::.", "::\\", 0, S_OK}, + {":::.", ":::", 0, S_OK}, {"C:.", "C:\\", 0, S_OK}, + {"C:.\\", "C:.\\", 0, S_OK}, + {"C:.\\.", "C:\\", 0, S_OK}, {"C:\\.", "C:\\", 0, S_OK}, {"C:\\.\\", "C:\\", 0, S_OK}, {"C:\\a.", "C:\\a", 0, S_OK}, + {"C:\\a.\\", "C:\\a.\\", 0, S_OK}, + {"C:\\.a", "C:\\.a", 0, S_OK}, + {"C:\\.a\\", "C:\\.a\\", 0, S_OK}, {"C:\\a\\.", "C:\\a", 0, S_OK}, {"C:\\a\\\\.", "C:\\a\\", 0, S_OK}, {"C:\\a\\\\\\.", "C:\\a\\\\", 0, S_OK}, + {".\\", "\\", 0, S_OK}, {"\\.", "\\", 0, S_OK}, {"\\\\.", "\\\\", 0, S_OK}, {"\\\\.\\", "\\\\", 0, S_OK}, @@ -115,21 +138,53 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = "\\\\?\\Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}\\", 0, S_OK}, /* .. */ + {"..a", "..a", 0, S_OK}, + {"..a\\", "..a\\", 0, S_OK}, + {"...a", "...a", 0, S_OK}, + {"...a\\", "...a\\", 0, S_OK}, + {"....a", "....a", 0, S_OK}, {"a..", "a", 0, S_OK}, + {"a..\\", "a..\\", 0, S_OK}, + {"a...", "a", 0, S_OK}, + {"a...\\", "a...\\", 0, S_OK}, + {"a....", "a", 0, S_OK}, + {"a....\\", "a....\\", 0, S_OK}, + {"..a..", "..a", 0, S_OK}, {"a..b", "a..b", 0, S_OK}, + {"..a..b..", "..a..b", 0, S_OK}, {"a\\..", "\\", 0, S_OK}, {"a\\..\\", "\\", 0, S_OK}, {"a\\..\\b", "\\b", 0, S_OK}, + {":..", ":", 0, S_OK}, + {"::..", "::\\", 0, S_OK}, + {":::..", ":::", 0, S_OK}, {"C:..", "C:\\", 0, S_OK}, + {"C:...", "C:\\", 0, S_OK}, + {"C:..\\", "C:..\\", 0, S_OK}, + {"C:..\\\\", "C:..\\\\", 0, S_OK}, + {"C:...\\", "C:...\\", 0, S_OK}, {"C:\\..", "C:\\", 0, S_OK}, + {"C:\\..a", "C:\\..a", 0, S_OK}, + {"C:\\..a\\", "C:\\..a\\", 0, S_OK}, + {"C:\\...a", "C:\\...a", 0, S_OK}, + {"C:\\...a\\", "C:\\...a\\", 0, S_OK}, + {"C:\\....a", "C:\\....a", 0, S_OK}, + {"C:\\....a\\", "C:\\....a\\", 0, S_OK}, + {"C:\\a..", "C:\\a", 0, S_OK}, + {"C:\\a..\\", "C:\\a..\\", 0, S_OK}, {"C:\\\\..", "C:\\", 0, S_OK}, {"C:\\..\\", "C:\\", 0, S_OK}, + {"C:\\...\\", "C:\\...\\", 0, S_OK}, {"C:\\a\\..", "C:\\", 0, S_OK}, + {"C:\\a\\b..", "C:\\a\\b", 0, S_OK}, {"C:\\a\\\\..", "C:\\a", 0, S_OK}, {"C:\\a\\\\\\..", "C:\\a\\", 0, S_OK}, {"C:\\a\\..\\b", "C:\\b", 0, S_OK}, {"C:\\a\\..\\\\b", "C:\\\\b", 0, S_OK}, + {"..\\", "\\", 0, S_OK}, + {"...\\", "...\\", 0, S_OK}, {"\\..", "\\", 0, S_OK}, + {"\\...", "\\", 0, S_OK}, {"\\\\..", "\\\\", 0, S_OK}, {"\\\\\\..", "\\", 0, S_OK}, {"\\\\..\\", "\\\\", 0, S_OK}, @@ -249,6 +304,8 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = /* PATHCCH_DO_NOT_NORMALIZE_SEGMENTS */ /* No effect for spaces */ + {"a ", "a ", 0, S_OK}, + {"C:\\a ", "C:\\a ", 0, S_OK}, {"C:\\a \\", "C:\\a \\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\\a\\ ", "C:\\a\\ ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\\a ", "C:\\a ", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, @@ -263,8 +320,15 @@ static const struct alloccanonicalize_test alloccanonicalize_tests[] = {"*..", "*..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {".", "\\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"..", "\\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":.", ":.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"::.", "::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":::.", ":::.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":..", ":..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"::..", "::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {":::..", ":::..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:.", "C:.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:..", "C:..", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, + {"C:...", "C:...", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\\a\\.", "C:\\a", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\\a\\..", "C:\\", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK}, {"C:\\a.", "C:\\a.", PATHCCH_DO_NOT_NORMALIZE_SEGMENTS, S_OK},
1
0
0
0
Jeff Smith : kernelbase: Fix PathAllocCanonicalize handling segments that contain dots.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: 5278fb29acd7e9f89947ac600038e1a605a5df50 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5278fb29acd7e9f89947ac60…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Thu Sep 19 12:04:30 2019 +0800 kernelbase: Fix PathAllocCanonicalize handling segments that contain dots. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47766
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c13a8f60bdef5b69f5db61f79efb7fd341a27303) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernelbase/path.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index bcd129cce9..adefe3abc7 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -204,13 +204,8 @@ HRESULT WINAPI PathAllocCanonicalize(const WCHAR *path_in, DWORD flags, WCHAR ** continue; } - /* Keep the . if one of the following is true: - * 1. PATHCCH_DO_NOT_NORMALIZE_SEGMENTS - * 2. in form of a..b - */ - if (dst > buffer - && (((flags & PATHCCH_DO_NOT_NORMALIZE_SEGMENTS) && dst[-1] != '\\') - || (dst[-1] != '\\' && src[2] != '\\' && src[2]))) + /* Keep the .. if not surrounded by \ */ + if ((src[2] != '\\' && src[2]) || (dst > buffer && dst[-1] != '\\')) { *dst++ = *src++; *dst++ = *src++; @@ -241,14 +236,8 @@ HRESULT WINAPI PathAllocCanonicalize(const WCHAR *path_in, DWORD flags, WCHAR ** } else { - /* Keep the . if one of the following is true: - * 1. PATHCCH_DO_NOT_NORMALIZE_SEGMENTS - * 2. in form of a.b, which is used in domain names - * 3. *. - */ - if (dst > buffer - && ((flags & PATHCCH_DO_NOT_NORMALIZE_SEGMENTS && dst[-1] != '\\') - || (dst[-1] != '\\' && src[1] != '\\' && src[1]) || (dst[-1] == '*'))) + /* Keep the . if not surrounded by \ */ + if ((src[1] != '\\' && src[1]) || (dst > buffer && dst[-1] != '\\')) { *dst++ = *src++; continue; @@ -280,6 +269,22 @@ HRESULT WINAPI PathAllocCanonicalize(const WCHAR *path_in, DWORD flags, WCHAR ** /* End the path */ *dst = 0; + /* Strip multiple trailing . */ + if (!(flags & PATHCCH_DO_NOT_NORMALIZE_SEGMENTS)) + { + while (dst > buffer && dst[-1] == '.') + { + /* Keep a . after * */ + if (dst - 1 > buffer && dst[-2] == '*') + break; + /* If . follow a : at the second character, remove the . and add a \ */ + else if (dst - 1 > buffer && dst[-2] == ':' && dst - 2 == buffer + 1) + *--dst = '\\'; + else + *--dst = 0; + } + } + /* If result path is empty, fill in \ */ if (!*buffer) {
1
0
0
0
Andrew Eikum : winex11.drv: Throttle calls to XResetScreenSaver.
by Alexandre Julliard
20 Apr '20
20 Apr '20
Module: wine Branch: oldstable Commit: 01ea6a5b63be3924055b59893b388ad85bf23a7c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=01ea6a5b63be3924055b5989…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Sep 17 08:09:36 2019 -0500 winex11.drv: Throttle calls to XResetScreenSaver. Frequent calls to XResetScreenSaver cause performance problems on some GPU drivers, see
https://bugs.freedesktop.org/show_bug.cgi?id=110659
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit cb703739e5c138e3beffab321b84edb129156000) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winex11.drv/window.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 7a3b340e19..7589b3228e 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1792,10 +1792,20 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, switch (msg) { case WM_WINE_NOTIFY_ACTIVITY: - XResetScreenSaver( gdi_display ); - XFlush( gdi_display ); + { + static ULONGLONG last = 0; + ULONGLONG now = GetTickCount64(); + /* calling XResetScreenSaver too often can cause performance + * problems, so throttle it */ + if (now > last + 5000) + { + XResetScreenSaver( gdi_display ); + XFlush( gdi_display ); + last = now; + } break; } + } return desktop_orig_wndproc( hwnd, msg, wp, lp ); }
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
102
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
Results per page:
10
25
50
100
200