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
August 2019
----- 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
703 discussions
Start a n
N
ew thread
Sebastian Lackner : dinput: Avoid deadlock when CS are acquired in different order.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: d756bb7f6b3d0ca75cfad4279ce769f6964b1bcd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d756bb7f6b3d0ca75cfad427…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Apr 8 03:48:16 2019 +0000 dinput: Avoid deadlock when CS are acquired in different order. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=43356
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 02f0342833f6a6affced820519003d954681a7b4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dinput/device.c | 8 ++++---- dlls/dinput/dinput_main.c | 4 ++-- dlls/dinput/dinput_private.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 322c8ac..6c44616 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -994,9 +994,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) EnterCriticalSection(&This->crit); res = This->acquired ? S_FALSE : DI_OK; This->acquired = 1; - if (res == DI_OK) - check_dinput_hooks(iface); LeaveCriticalSection(&This->crit); + if (res == DI_OK) + check_dinput_hooks(iface, TRUE); return res; } @@ -1022,9 +1022,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface) EnterCriticalSection(&This->crit); res = !This->acquired ? DI_NOEFFECT : DI_OK; This->acquired = 0; - if (res == DI_OK) - check_dinput_hooks(iface); LeaveCriticalSection(&This->crit); + if (res == DI_OK) + check_dinput_hooks(iface, FALSE); return res; } diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 66dc6e3..65aaf92 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1834,7 +1834,7 @@ static BOOL check_hook_thread(void) return hook_thread_id != 0; } -void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface) +void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface, BOOL acquired) { static HHOOK callwndproc_hook; static ULONG foreground_cnt; @@ -1844,7 +1844,7 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface) if (dev->dwCoopLevel & DISCL_FOREGROUND) { - if (dev->acquired) + if (acquired) foreground_cnt++; else foreground_cnt--; diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index abdfbeb..acda6c8 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -71,7 +71,7 @@ extern const struct dinput_device joystick_linux_device DECLSPEC_HIDDEN; extern const struct dinput_device joystick_linuxinput_device DECLSPEC_HIDDEN; extern const struct dinput_device joystick_osx_device DECLSPEC_HIDDEN; -extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8W) DECLSPEC_HIDDEN; +extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8W, BOOL) DECLSPEC_HIDDEN; extern void check_dinput_events(void) DECLSPEC_HIDDEN; typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM);
1
0
0
0
Paul Gofman : ddraw: Fix ddraw[1-4] light activation / deactivation.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 7bbec8bf226358453e7f26cb541ce70f369c8367 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bbec8bf226358453e7f26cb…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Thu Mar 28 21:50:12 2019 +0300 ddraw: Fix ddraw[1-4] light activation / deactivation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=42572
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 addc611b2ac56d4fc59a9df8f129f96ea4105773) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ddraw/ddraw_private.h | 1 + dlls/ddraw/device.c | 38 +++++++++++++++++--------------------- dlls/ddraw/light.c | 27 ++++++++++++--------------- dlls/ddraw/tests/ddraw4.c | 11 ++++++++++- dlls/ddraw/viewport.c | 19 +++++++++++-------- 5 files changed, 51 insertions(+), 45 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index b035a7e..79c2dbd 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -517,6 +517,7 @@ struct d3d_viewport *unsafe_impl_from_IDirect3DViewport(IDirect3DViewport *iface /* Helper functions */ void viewport_activate(struct d3d_viewport *viewport, BOOL ignore_lights) DECLSPEC_HIDDEN; +void viewport_deactivate(struct d3d_viewport *viewport) DECLSPEC_HIDDEN; void d3d_viewport_init(struct d3d_viewport *viewport, struct ddraw *ddraw) DECLSPEC_HIDDEN; /***************************************************************************** diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index af403b0..b251b53 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -819,7 +819,9 @@ static HRESULT WINAPI d3d_device3_DeleteViewport(IDirect3DDevice3 *iface, IDirec if (device->current_viewport == vp) { - TRACE("Deleting current viewport, unsetting and releasing\n"); + TRACE("Deleting current viewport, unsetting and releasing.\n"); + + viewport_deactivate(vp); IDirect3DViewport3_Release(viewport); device->current_viewport = NULL; } @@ -1689,48 +1691,42 @@ static HRESULT WINAPI d3d_device1_GetDirect3D(IDirect3DDevice *iface, IDirect3D * (Is a NULL viewport valid?) * *****************************************************************************/ -static HRESULT WINAPI d3d_device3_SetCurrentViewport(IDirect3DDevice3 *iface, IDirect3DViewport3 *Direct3DViewport3) +static HRESULT WINAPI d3d_device3_SetCurrentViewport(IDirect3DDevice3 *iface, IDirect3DViewport3 *viewport) { - struct d3d_device *This = impl_from_IDirect3DDevice3(iface); - struct d3d_viewport *vp = unsafe_impl_from_IDirect3DViewport3(Direct3DViewport3); + struct d3d_viewport *vp = unsafe_impl_from_IDirect3DViewport3(viewport); + struct d3d_device *device = impl_from_IDirect3DDevice3(iface); - TRACE("iface %p, viewport %p.\n", iface, Direct3DViewport3); + TRACE("iface %p, viewport %p, current_viewport %p.\n", iface, viewport, device->current_viewport); if (!vp) { - WARN("Direct3DViewport3 is NULL, returning DDERR_INVALIDPARAMS\n"); + WARN("Direct3DViewport3 is NULL.\n"); return DDERR_INVALIDPARAMS; } wined3d_mutex_lock(); /* Do nothing if the specified viewport is the same as the current one */ - if (This->current_viewport == vp) + if (device->current_viewport == vp) { wined3d_mutex_unlock(); return D3D_OK; } - if (vp->active_device != This) + if (vp->active_device != device) { - WARN("Viewport %p active device is %p.\n", vp, vp->active_device); + WARN("Viewport %p, active device %p.\n", vp, vp->active_device); wined3d_mutex_unlock(); return DDERR_INVALIDPARAMS; } - /* Release previous viewport and AddRef the new one */ - if (This->current_viewport) + IDirect3DViewport3_AddRef(viewport); + if (device->current_viewport) { - TRACE("ViewportImpl is at %p, interface is at %p\n", This->current_viewport, - &This->current_viewport->IDirect3DViewport3_iface); - IDirect3DViewport3_Release(&This->current_viewport->IDirect3DViewport3_iface); + viewport_deactivate(device->current_viewport); + IDirect3DViewport3_Release(&device->current_viewport->IDirect3DViewport3_iface); } - IDirect3DViewport3_AddRef(Direct3DViewport3); - - /* Set this viewport as the current viewport */ - This->current_viewport = vp; - - /* Activate this viewport */ - viewport_activate(This->current_viewport, FALSE); + device->current_viewport = vp; + viewport_activate(device->current_viewport, FALSE); wined3d_mutex_unlock(); diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c index 9d0bb60..c19e34c 100644 --- a/dlls/ddraw/light.c +++ b/dlls/ddraw/light.c @@ -54,15 +54,14 @@ void light_activate(struct d3d_light *light) TRACE("light %p.\n", light); - if (!light->active_viewport || !light->active_viewport->active_device) return; + if (!light->active_viewport || !light->active_viewport->active_device + || light->active_viewport->active_device->current_viewport != light->active_viewport) + return; device = light->active_viewport->active_device; light_update(light); - if (!(light->light.dwFlags & D3DLIGHT_ACTIVE)) - { + if (light->light.dwFlags & D3DLIGHT_ACTIVE) IDirect3DDevice7_LightEnable(&device->IDirect3DDevice7_iface, light->dwLightIndex, TRUE); - light->light.dwFlags |= D3DLIGHT_ACTIVE; - } } /***************************************************************************** @@ -78,14 +77,13 @@ void light_deactivate(struct d3d_light *light) TRACE("light %p.\n", light); - if (!light->active_viewport || !light->active_viewport->active_device) return; - device = light->active_viewport->active_device; + if (!light->active_viewport || !light->active_viewport->active_device + || light->active_viewport->active_device->current_viewport != light->active_viewport) + return; + device = light->active_viewport->active_device; if (light->light.dwFlags & D3DLIGHT_ACTIVE) - { IDirect3DDevice7_LightEnable(&device->IDirect3DDevice7_iface, light->dwLightIndex, FALSE); - light->light.dwFlags &= ~D3DLIGHT_ACTIVE; - } } static inline struct d3d_light *impl_from_IDirect3DLight(IDirect3DLight *iface) @@ -195,13 +193,12 @@ static HRESULT WINAPI d3d_light_SetLight(IDirect3DLight *iface, D3DLIGHT *data) wined3d_mutex_lock(); memcpy(&light->light, data, sizeof(*data)); - if (!(light->light.dwFlags & D3DLIGHT_ACTIVE) && flags & D3DLIGHT_ACTIVE) - light_activate(light); - else if (light->light.dwFlags & D3DLIGHT_ACTIVE && !(flags & D3DLIGHT_ACTIVE)) + + if (!(flags & D3DLIGHT_ACTIVE)) light_deactivate(light); - else if (flags & D3DLIGHT_ACTIVE) - light_update(light); + light->light.dwFlags = flags; + light_activate(light); wined3d_mutex_unlock(); return D3D_OK; diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index ad985db..f913a4b 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -4189,7 +4189,16 @@ static void test_lighting(void) light_desc.dwFlags = D3DLIGHT_ACTIVE; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DViewport3_DeleteLight(viewport, light); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + light_desc.dwFlags = 0; + hr = IDirect3DLight_GetLight(light, (D3DLIGHT *)&light_desc); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#x.\n", light_desc.dwFlags); + + hr = IDirect3DViewport3_AddLight(viewport, light); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); for (i = 0; i < ARRAY_SIZE(tests); ++i) { diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index e7e4463..daa5ac8 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -112,6 +112,16 @@ void viewport_activate(struct d3d_viewport *This, BOOL ignore_lights) IDirect3DDevice7_SetViewport(&This->active_device->IDirect3DDevice7_iface, &vp); } +void viewport_deactivate(struct d3d_viewport *viewport) +{ + struct d3d_light *light; + + LIST_FOR_EACH_ENTRY(light, &viewport->light_list, struct d3d_light, entry) + { + light_deactivate(light); + } +} + /***************************************************************************** * _dump_D3DVIEWPORT, _dump_D3DVIEWPORT2 * @@ -783,14 +793,7 @@ static HRESULT WINAPI d3d_viewport_AddLight(IDirect3DViewport3 *iface, IDirect3D /* Attach the light to the viewport */ light_impl->active_viewport = This; - - /* If active, activate the light */ - if (This->active_device && light_impl->light.dwFlags & D3DLIGHT_ACTIVE) - { - /* Disable the flag so that light_activate actually does its job. */ - light_impl->light.dwFlags &= ~D3DLIGHT_ACTIVE; - light_activate(light_impl); - } + light_activate(light_impl); wined3d_mutex_unlock();
1
0
0
0
Zebediah Figura : msi: Fix handling of architecture in MSIREG_{Open, Delete}UninstallKey().
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 5c50407f7f10a851e9227f025e46039b2f77ae34 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5c50407f7f10a851e9227f02…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Apr 14 11:53:59 2019 -0500 msi: Fix handling of architecture in MSIREG_{Open, Delete}UninstallKey(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47009
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 3d9363446fad694b6e534d84fce63bfc9dbbf4d3) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msi/registry.c | 46 ++++++++---------- dlls/msi/tests/action.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 138 insertions(+), 29 deletions(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index efc7272..8b90254 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -164,11 +164,6 @@ static const WCHAR szUninstall[] = { 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'U','n','i','n','s','t','a','l','l','\\',0}; -static const WCHAR szUninstall_32node[] = { - 'S','o','f','t','w','a','r','e','\\','W','o','w','6','4','3','2','N','o','d','e','\\', - 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','U','n','i','n','s','t','a','l','l','\\',0}; - static const WCHAR szUserComponents[] = { 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', 'I','n','s','t','a','l','l','e','r','\\','C','o','m','p','o','n','e','n','t','s','\\',0}; @@ -452,41 +447,38 @@ static WCHAR *get_user_sid(void) UINT MSIREG_OpenUninstallKey(const WCHAR *product, enum platform platform, HKEY *key, BOOL create) { + REGSAM access = KEY_ALL_ACCESS; WCHAR keypath[0x200]; TRACE("%s\n", debugstr_w(product)); - if (is_64bit && platform == PLATFORM_INTEL) - { - strcpyW(keypath, szUninstall_32node); - strcatW(keypath, product); - } + if (platform == PLATFORM_INTEL) + access |= KEY_WOW64_32KEY; else - { - strcpyW(keypath, szUninstall); - strcatW(keypath, product); - } - if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL); - return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, KEY_ALL_ACCESS, key); + access |= KEY_WOW64_64KEY; + strcpyW(keypath, szUninstall); + strcatW(keypath, product); + if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL); + return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key); } UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform) { - WCHAR keypath[0x200]; + REGSAM access = KEY_ALL_ACCESS; + HKEY parent; + LONG r; TRACE("%s\n", debugstr_w(product)); - if (is_64bit && platform == PLATFORM_INTEL) - { - strcpyW(keypath, szUninstall_32node); - strcatW(keypath, product); - } + if (platform == PLATFORM_INTEL) + access |= KEY_WOW64_32KEY; else - { - strcpyW(keypath, szUninstall); - strcatW(keypath, product); - } - return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath); + access |= KEY_WOW64_64KEY; + if ((r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, szUninstall, 0, access, &parent))) + return r; + r = RegDeleteTreeW(parent, product); + RegCloseKey(parent); + return r; } UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 951b89c..068fc55 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -440,8 +440,8 @@ static const char pp_install_exec_seq_dat[] = "ru_immediate\tREGISTER_USER AND ALLUSERS\t6001\n" "ru_deferred\tREGISTER_USER AND ALLUSERS\t6002\n" "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" - "rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n" - "rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n" + "rp_immediate\tREGISTER_PRODUCT AND ALLUSERS AND NOT RP_TEST64\t6101\n" + "rp_deferred\tREGISTER_PRODUCT AND ALLUSERS AND NOT RP_TEST64\t6102\n" "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n" "pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n" "pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n" @@ -2876,6 +2876,123 @@ todo_wine ok(!res, "got %d\n", res); RegCloseKey(hkey); + if (is_wow64 || is_64bit) + { + DeleteFileA(msifile); + create_database_template(msifile, pp_tables, ARRAY_SIZE(pp_tables), 200, "x64;1033"); + + r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1 RP_TEST64=1"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %d\n", res); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); + CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); + CHECK_DEL_REG_STR(hkey, "InstallDate", date); + CHECK_DEL_REG_STR(hkey, "InstallSource", temp); + CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); + CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); + CHECK_DEL_REG_STR(hkey, "Comments", NULL); + CHECK_DEL_REG_STR(hkey, "Contact", NULL); + CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); + CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); + CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); + CHECK_DEL_REG_STR(hkey, "Readme", NULL); + CHECK_DEL_REG_STR(hkey, "Size", NULL); + CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); + CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); + CHECK_DEL_REG_DWORD(hkey, "Language", 1033); + CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); + CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); + CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); + CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); + todo_wine + CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size()); + + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); + RegCloseKey(hkey); + + sprintf(keypath, userdata, "S-1-5-18"); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + size = sizeof(path); + RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size); + DeleteFileA(path); + RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */ + + CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST"); + CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); + CHECK_DEL_REG_STR(props, "InstallDate", date); + CHECK_DEL_REG_STR(props, "InstallSource", temp); + CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(props, "Publisher", "Wine"); + CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); + CHECK_DEL_REG_STR(props, "Comments", NULL); + CHECK_DEL_REG_STR(props, "Contact", NULL); + CHECK_DEL_REG_STR(props, "HelpLink", NULL); + CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); + CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(props, "NoModify", 1); + CHECK_DEL_REG_STR(props, "Readme", NULL); + CHECK_DEL_REG_STR(props, "Size", NULL); + CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); + CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); + CHECK_DEL_REG_DWORD(props, "Language", 1033); + CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); + CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); + CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); + CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); + todo_wine + CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size()); + + res = RegDeleteKeyA(props, ""); + ok(!res, "got %d\n", res); + RegCloseKey(props); + + res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); + todo_wine + { + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + } + + res = RegDeleteKeyA(usage, ""); + todo_wine + ok(!res, "got %d\n", res); + RegCloseKey(usage); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); + RegCloseKey(hkey); + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); + RegCloseKey(hkey); + } + else + skip("64-bit RegisterProduct tests\n"); + error: DeleteFileA(msifile); DeleteFileA("msitest\\maximus");
1
0
0
0
Vincent Povirk : uninstaller: Re-exec as 64-bit in wow64.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 18151cbd1a7155e308e804393153a4d591c7e430 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18151cbd1a7155e308e80439…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sat Mar 30 15:55:43 2019 -0500 uninstaller: Re-exec as 64-bit in wow64. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 88580a3ad6e6afea25716b8717a33d20184154e5) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/uninstaller/main.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index 142d3d1..fa9a23c 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -165,6 +165,31 @@ int wmain(int argc, WCHAR *argv[]) static const WCHAR listW[] = { '-','-','l','i','s','t',0 }; static const WCHAR removeW[] = { '-','-','r','e','m','o','v','e',0 }; int i = 1; + BOOL is_wow64; + + if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) + { + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR filename[MAX_PATH]; + void *redir; + DWORD exit_code; + + memset( &si, 0, sizeof(si) ); + si.cb = sizeof(si); + GetModuleFileNameW( 0, filename, MAX_PATH ); + + Wow64DisableWow64FsRedirection( &redir ); + if (CreateProcessW( filename, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) + { + WINE_TRACE( "restarting %s\n", wine_dbgstr_w(filename) ); + WaitForSingleObject( pi.hProcess, INFINITE ); + GetExitCodeProcess( pi.hProcess, &exit_code ); + ExitProcess( exit_code ); + } + else WINE_ERR( "failed to restart 64-bit %s, err %d\n", wine_dbgstr_w(filename), GetLastError() ); + Wow64RevertWow64FsRedirection( redir ); + } while( i<argc ) {
1
0
0
0
Vijay Kiran Kamuju : d3dx9: Generate ID3DXSkinInfo in D3DXLoadSkinMeshFromXof() when needed.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: e06b8d3e8d37143800f00dcbf4f0f403d2a698e2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e06b8d3e8d37143800f00dcb…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Thu Apr 4 16:54:35 2019 +0200 d3dx9: Generate ID3DXSkinInfo in D3DXLoadSkinMeshFromXof() when needed. Based on a patch by Michael Müller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33904
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 70d722340ad546ab988fffe4577e0c0ebe35a982) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx9_36/mesh.c | 7 ++++++ dlls/d3dx9_36/tests/mesh.c | 58 +++++++++++++++++++++------------------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index acbb247..40f0355 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -3332,6 +3332,13 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, goto end; } + if ((provide_flags & PROVIDE_SKININFO) && !mesh_data->skin_info) + { + if (FAILED(hr = D3DXCreateSkinInfoFVF(mesh_data->num_vertices, mesh_data->fvf, + mesh_data->nb_bones, &mesh_data->skin_info))) + goto end; + } + hr = D3D_OK; end: diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 90d817d..ca14a76 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -11319,53 +11319,49 @@ static void test_load_skin_mesh_from_xof(void) ok(!materials, "Got unexpected value %p.\n", materials); ok(!effects, "Got unexpected value %p.\n", effects); ok(!count, "Got unexpected value %u.\n", count); - todo_wine ok(!!skin_info, "Got unexpected value %p.\n", skin_info); + ok(!!skin_info, "Got unexpected value %p.\n", skin_info); ok(!!mesh, "Got unexpected value %p.\n", mesh); count = mesh->lpVtbl->GetNumVertices(mesh); ok(count == 3, "Got unexpected value %u.\n", count); count = mesh->lpVtbl->GetNumFaces(mesh); ok(count == 1, "Got unexpected value %u.\n", count); - if (skin_info) - { - hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - compare_elements(declaration, expected_declaration, __LINE__, 0); - - fvf = skin_info->lpVtbl->GetFVF(skin_info); - ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf); + hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + compare_elements(declaration, expected_declaration, __LINE__, 0); - count = skin_info->lpVtbl->GetNumBones(skin_info); - ok(!count, "Got unexpected value %u.\n", count); + fvf = skin_info->lpVtbl->GetFVF(skin_info); + ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf); - influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); - ok(!influence, "Got unexpected value %.8e.\n", influence); + count = skin_info->lpVtbl->GetNumBones(skin_info); + ok(!count, "Got unexpected value %u.\n", count); - memset(max_influences, 0x55, sizeof(max_influences)); - hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences); - ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr); - ok(!max_influences[0], "Got unexpected value %u.\n", max_influences[0]); - ok(max_influences[1] == 0x55555555, "Got unexpected value %u.\n", max_influences[1]); - ok(max_influences[2] == 0x55555555, "Got unexpected value %u.\n", max_influences[2]); + influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); + ok(!influence, "Got unexpected value %.8e.\n", influence); - bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0); - ok(!bone_name, "Got unexpected value %p.\n", bone_name); + memset(max_influences, 0x55, sizeof(max_influences)); + hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences); + todo_wine ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr); + todo_wine ok(!max_influences[0], "Got unexpected value %u.\n", max_influences[0]); + ok(max_influences[1] == 0x55555555, "Got unexpected value %u.\n", max_influences[1]); + ok(max_influences[2] == 0x55555555, "Got unexpected value %u.\n", max_influences[2]); - count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); - ok(!count, "Got unexpected value %u.\n", count); + bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0); + ok(!bone_name, "Got unexpected value %p.\n", bone_name); - count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1); - ok(!count, "Got unexpected value %u.\n", count); + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); + ok(!count, "Got unexpected value %u.\n", count); - matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); - ok(!matrix, "Got unexpected value %p.\n", matrix); + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1); + ok(!count, "Got unexpected value %u.\n", count); - matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0); - ok(!matrix, "Got unexpected value %p.\n", matrix); + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); + ok(!matrix, "Got unexpected value %p.\n", matrix); - skin_info->lpVtbl->Release(skin_info); - } + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0); + ok(!matrix, "Got unexpected value %p.\n", matrix); + skin_info->lpVtbl->Release(skin_info); mesh->lpVtbl->Release(mesh); adjacency->lpVtbl->Release(adjacency); file_data->lpVtbl->Release(file_data);
1
0
0
0
Michael Müller : d3dx9/tests: Add initial tests for dummy skin info interface.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: ec32204921dc871206a0e9d6bace2fc63db086c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec32204921dc871206a0e9d6…
Author: Michael Müller <michael(a)fds-team.de> Date: Tue Mar 26 22:26:49 2019 +0100 d3dx9/tests: Add initial tests for dummy skin info interface. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit aec8e12a3d71272b31aa8b5b075fe1cd88517c92) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx9_36/tests/mesh.c | 184 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 3fcd65f..90d817d 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -25,6 +25,9 @@ #include <limits.h> #include "wine/test.h" #include "d3dx9.h" +#include "initguid.h" +#include "rmxftmpl.h" +#include "rmxfguid.h" #ifndef NAN /* From wine/port.h */ @@ -11191,6 +11194,186 @@ static void test_D3DXFrameFind(void) ok(ret == &child3, "Unexpected frame, %p.\n", ret); } +static ID3DXFileData *get_mesh_data(const void *memory, SIZE_T length) +{ + ID3DXFileData *file_data, *ret = NULL; + ID3DXFileEnumObject *enum_obj = NULL; + D3DXF_FILELOADMEMORY source; + ID3DXFile *file; + SIZE_T i, count; + GUID guid; + + if (FAILED(D3DXFileCreate(&file))) + return NULL; + + if (FAILED(file->lpVtbl->RegisterTemplates(file, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES))) + goto cleanup; + + source.lpMemory = memory; + source.dSize = length; + if (FAILED(file->lpVtbl->CreateEnumObject(file, &source, D3DXF_FILELOAD_FROMMEMORY, &enum_obj))) + goto cleanup; + + if (FAILED(enum_obj->lpVtbl->GetChildren(enum_obj, &count))) + goto cleanup; + + for (i = 0; i < count; ++i) + { + if (FAILED(enum_obj->lpVtbl->GetChild(enum_obj, i, &file_data))) + goto cleanup; + + if (SUCCEEDED(file_data->lpVtbl->GetType(file_data, &guid)) + && IsEqualGUID(&guid, &TID_D3DRMMesh)) + { + ret = file_data; + break; + } + else + { + file_data->lpVtbl->Release(file_data); + } + } + +cleanup: + if (enum_obj) + enum_obj->lpVtbl->Release(enum_obj); + file->lpVtbl->Release(file); + + return ret; +} + +static void test_load_skin_mesh_from_xof(void) +{ + static const char simple_xfile[] = + "xof 0303txt 0032" + "Mesh {" + "3;" + "0.0; 0.0; 0.0;," + "0.0; 1.0; 0.0;," + "1.0; 1.0; 0.0;;" + "1;" + "3; 0, 1, 2;;" + "}"; + static const D3DVERTEXELEMENT9 expected_declaration[] = + { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + D3DDECL_END(), + }; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + ID3DXBuffer *adjacency, *materials, *effects; + DWORD max_influences[3], count, fvf; + D3DPRESENT_PARAMETERS d3dpp; + IDirect3DDevice9 *device; + ID3DXSkinInfo *skin_info; + ID3DXFileData *file_data; + const char *bone_name; + D3DXMATRIX *matrix; + float influence; + ID3DXMesh *mesh; + IDirect3D9 *d3d; + ULONG refcount; + HRESULT hr; + HWND hwnd; + + if (!(hwnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0, + 640, 480, NULL, NULL, NULL, NULL))) + { + skip("Failed to create application window.\n"); + return; + } + + d3d = Direct3DCreate9(D3D_SDK_VERSION); + if (!d3d) + { + skip("Failed to create d3d object.\n"); + DestroyWindow(hwnd); + return; + } + + memset(&d3dpp, 0, sizeof(d3dpp)); + d3dpp.Windowed = TRUE; + d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; + + hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, + D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); + IDirect3D9_Release(d3d); + if (FAILED(hr)) + { + skip("Failed to create device, hr %#x.\n", hr); + DestroyWindow(hwnd); + return; + } + + file_data = get_mesh_data(simple_xfile, sizeof(simple_xfile) - 1); + ok(!!file_data, "Failed to load mesh data.\n"); + + adjacency = materials = effects = (void *)0xdeadbeef; + count = ~0u; + skin_info = (void *)0xdeadbeef; + mesh = (void *)0xdeadbeef; + + hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count, + &skin_info, &mesh); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(!!adjacency, "Got unexpected value %p.\n", adjacency); + ok(!materials, "Got unexpected value %p.\n", materials); + ok(!effects, "Got unexpected value %p.\n", effects); + ok(!count, "Got unexpected value %u.\n", count); + todo_wine ok(!!skin_info, "Got unexpected value %p.\n", skin_info); + ok(!!mesh, "Got unexpected value %p.\n", mesh); + count = mesh->lpVtbl->GetNumVertices(mesh); + ok(count == 3, "Got unexpected value %u.\n", count); + count = mesh->lpVtbl->GetNumFaces(mesh); + ok(count == 1, "Got unexpected value %u.\n", count); + + if (skin_info) + { + hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + compare_elements(declaration, expected_declaration, __LINE__, 0); + + fvf = skin_info->lpVtbl->GetFVF(skin_info); + ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf); + + count = skin_info->lpVtbl->GetNumBones(skin_info); + ok(!count, "Got unexpected value %u.\n", count); + + influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info); + ok(!influence, "Got unexpected value %.8e.\n", influence); + + memset(max_influences, 0x55, sizeof(max_influences)); + hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences); + ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr); + ok(!max_influences[0], "Got unexpected value %u.\n", max_influences[0]); + ok(max_influences[1] == 0x55555555, "Got unexpected value %u.\n", max_influences[1]); + ok(max_influences[2] == 0x55555555, "Got unexpected value %u.\n", max_influences[2]); + + bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0); + ok(!bone_name, "Got unexpected value %p.\n", bone_name); + + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0); + ok(!count, "Got unexpected value %u.\n", count); + + count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1); + ok(!count, "Got unexpected value %u.\n", count); + + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1); + ok(!matrix, "Got unexpected value %p.\n", matrix); + + matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0); + ok(!matrix, "Got unexpected value %p.\n", matrix); + + skin_info->lpVtbl->Release(skin_info); + } + + mesh->lpVtbl->Release(mesh); + adjacency->lpVtbl->Release(adjacency); + file_data->lpVtbl->Release(file_data); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + DestroyWindow(hwnd); +} + START_TEST(mesh) { D3DXBoundProbeTest(); @@ -11222,4 +11405,5 @@ START_TEST(mesh) test_optimize_faces(); test_compute_normals(); test_D3DXFrameFind(); + test_load_skin_mesh_from_xof(); }
1
0
0
0
Zhiyi Zhang : kernel32: Open replaced file without GENERIC_WRITE in ReplaceFileW().
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: b87334d6a90052ebc11b95c80ec20fdf4b0868d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b87334d6a90052ebc11b95c8…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Apr 9 23:54:20 2019 +0800 kernel32: Open replaced file without GENERIC_WRITE in ReplaceFileW(). As MSDN says, the replaced file is opened with the GENERIC_READ, DELETE, and SYNCHRONIZE access rights. If GENERIC_WRITE is added, then it will fail with previous file opens without FILE_SHARE_WRITE. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33845
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 04ccd995b1aec5eac5874454a320b37676b69c42) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernel32/file.c | 19 +++++++++++++++++-- dlls/kernel32/tests/file.c | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index c66073b..64c3e3e 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1746,6 +1746,7 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa NTSTATUS status; IO_STATUS_BLOCK io; OBJECT_ATTRIBUTES attr; + FILE_BASIC_INFORMATION info; TRACE("%s %s %s 0x%08x %p %p\n", debugstr_w(lpReplacedFileName), debugstr_w(lpReplacementFileName), debugstr_w(lpBackupFileName), @@ -1772,7 +1773,7 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - /* Open the "replaced" file for reading and writing */ + /* Open the "replaced" file for reading */ if (!(RtlDosPathNameToNtPathName_U(lpReplacedFileName, &nt_replaced_name, NULL, NULL))) { error = ERROR_PATH_NOT_FOUND; @@ -1780,7 +1781,7 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa } replaced_flags = lpBackupFileName ? FILE_OPEN : FILE_OPEN_IF; attr.ObjectName = &nt_replaced_name; - status = NtOpenFile(&hReplaced, GENERIC_READ|GENERIC_WRITE|DELETE|SYNCHRONIZE, + status = NtOpenFile(&hReplaced, GENERIC_READ|DELETE|SYNCHRONIZE, &attr, &io, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NON_DIRECTORY_FILE); @@ -1796,6 +1797,20 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa goto fail; } + /* Replacement should fail if replaced is READ_ONLY */ + status = NtQueryInformationFile(hReplaced, &io, &info, sizeof(info), FileBasicInformation); + if (status != STATUS_SUCCESS) + { + error = RtlNtStatusToDosError(status); + goto fail; + } + + if (info.FileAttributes & FILE_ATTRIBUTE_READONLY) + { + error = ERROR_ACCESS_DENIED; + goto fail; + } + /* * Open the replacement file for reading, writing, and deleting * (writing and deleting are needed when finished) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 8d7af9c..4aa8be8 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3672,7 +3672,7 @@ static void test_ReplaceFileA(void) */ SetLastError(0xdeadbeef); ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - todo_wine ok(ret == 0 && GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %d\n", GetLastError()); + ok(ret == 0 && GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %d\n", GetLastError()); /* make sure that the replacement file still exists */ hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hReplacementFile != INVALID_HANDLE_VALUE || @@ -3704,7 +3704,7 @@ static void test_ReplaceFileA(void) "unexpected error, replaced file should be able to be opened %d\n", GetLastError()); /*Calling ReplaceFileA on an exe should succeed*/ ret = pReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - todo_wine ok(ret, "ReplaceFileA: unexpected error %d\n", GetLastError()); + ok(ret, "ReplaceFileA: unexpected error %d\n", GetLastError()); CloseHandle(hReplacedFile); /* replacement file still exists, make pass w/o "replaced" */
1
0
0
0
Sebastian Lackner : dinput: Do not wait for hook thread startup in IDirectInput8::Initialize.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 6eb596c5e8044bd57c2a71ed28f97755e1d6f0ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6eb596c5e8044bd57c2a71ed…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Apr 3 11:39:36 2019 +0800 dinput: Do not wait for hook thread startup in IDirectInput8::Initialize. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=21403
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 890d1b812a9477b434486ab503c15dd3fce3e964) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dinput/dinput_main.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 54777da..66dc6e3 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1719,7 +1719,7 @@ static DWORD WINAPI hook_thread_proc(void *param) /* Force creation of the message queue */ PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE ); - SetEvent(*(LPHANDLE)param); + SetEvent(param); while (GetMessageW( &msg, 0, 0, 0 )) { @@ -1785,6 +1785,7 @@ static DWORD WINAPI hook_thread_proc(void *param) } static DWORD hook_thread_id; +static HANDLE hook_thread_event; static CRITICAL_SECTION_DEBUG dinput_critsect_debug = { @@ -1803,24 +1804,21 @@ static BOOL check_hook_thread(void) TRACE("IDirectInputs left: %d\n", list_count(&direct_input_list)); if (!list_empty(&direct_input_list) && !hook_thread) { - HANDLE event; - - event = CreateEventW(NULL, FALSE, FALSE, NULL); - hook_thread = CreateThread(NULL, 0, hook_thread_proc, &event, 0, &hook_thread_id); - if (event && hook_thread) - { - HANDLE handles[2]; - handles[0] = event; - handles[1] = hook_thread; - WaitForMultipleObjects(2, handles, FALSE, INFINITE); - } + hook_thread_event = CreateEventW(NULL, FALSE, FALSE, NULL); + hook_thread = CreateThread(NULL, 0, hook_thread_proc, hook_thread_event, 0, &hook_thread_id); LeaveCriticalSection(&dinput_hook_crit); - CloseHandle(event); } else if (list_empty(&direct_input_list) && hook_thread) { DWORD tid = hook_thread_id; + if (hook_thread_event) /* if thread is not started yet */ + { + WaitForSingleObject(hook_thread_event, INFINITE); + CloseHandle(hook_thread_event); + hook_thread_event = NULL; + } + hook_thread_id = 0; PostThreadMessageW(tid, WM_USER+0x10, 0, 0); LeaveCriticalSection(&dinput_hook_crit); @@ -1861,6 +1859,13 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface) callwndproc_hook = NULL; } + if (hook_thread_event) /* if thread is not started yet */ + { + WaitForSingleObject(hook_thread_event, INFINITE); + CloseHandle(hook_thread_event); + hook_thread_event = NULL; + } + PostThreadMessageW( hook_thread_id, WM_USER+0x10, 1, 0 ); LeaveCriticalSection(&dinput_hook_crit);
1
0
0
0
Claudio Fontana : kernel32: Allow empty profile section and key name strings.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 346b743bc1a009d9e290ddb0446084f94f142e8c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=346b743bc1a009d9e290ddb0…
Author: Claudio Fontana <claudio.fontana(a)linaro.org> Date: Fri Mar 22 23:49:28 2019 +0100 kernel32: Allow empty profile section and key name strings. Consider "" a normal section, and fix calculation for zero length section name string and key name string. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=8036
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=18099
Signed-off-by: Claudio Fontana <claudio.fontana(a)gmail.com> Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit be678a52e163111085ab3694b6c1f3af8e4d4a4a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernel32/profile.c | 40 ++++++++++++++++------------------------ dlls/kernel32/tests/profile.c | 2 -- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 65a8f28..027693e 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -500,7 +500,7 @@ static BOOL PROFILE_DeleteSection( PROFILESECTION **section, LPCWSTR name ) { while (*section) { - if ((*section)->name[0] && !strcmpiW( (*section)->name, name )) + if (!strcmpiW( (*section)->name, name )) { PROFILESECTION *to_del = *section; *section = to_del->next; @@ -524,7 +524,7 @@ static BOOL PROFILE_DeleteKey( PROFILESECTION **section, { while (*section) { - if ((*section)->name[0] && !strcmpiW( (*section)->name, section_name )) + if (!strcmpiW( (*section)->name, section_name )) { PROFILEKEY **key = &(*section)->key; while (*key) @@ -556,7 +556,7 @@ static void PROFILE_DeleteAllKeys( LPCWSTR section_name) PROFILESECTION **section= &CurProfile->section; while (*section) { - if ((*section)->name[0] && !strcmpiW( (*section)->name, section_name )) + if (!strcmpiW( (*section)->name, section_name )) { PROFILEKEY **key = &(*section)->key; while (*key) @@ -582,31 +582,28 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, LPCWSTR key_name, BOOL create, BOOL create_always ) { LPCWSTR p; - int seclen, keylen; + int seclen = 0, keylen = 0; while (PROFILE_isspaceW(*section_name)) section_name++; if (*section_name) + { p = section_name + strlenW(section_name) - 1; - else - p = section_name; - - while ((p > section_name) && PROFILE_isspaceW(*p)) p--; - seclen = p - section_name + 1; + while ((p > section_name) && PROFILE_isspaceW(*p)) p--; + seclen = p - section_name + 1; + } while (PROFILE_isspaceW(*key_name)) key_name++; if (*key_name) + { p = key_name + strlenW(key_name) - 1; - else - p = key_name; - - while ((p > key_name) && PROFILE_isspaceW(*p)) p--; - keylen = p - key_name + 1; + while ((p > key_name) && PROFILE_isspaceW(*p)) p--; + keylen = p - key_name + 1; + } while (*section) { - if ( ((*section)->name[0]) - && (!(strncmpiW( (*section)->name, section_name, seclen ))) - && (((*section)->name)[seclen] == '\0') ) + if (!strncmpiW((*section)->name, section_name, seclen) && + ((*section)->name)[seclen] == '\0') { PROFILEKEY **key = &(*section)->key; @@ -873,7 +870,7 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name, while (section) { - if (section->name[0] && !strcmpiW( section->name, section_name )) + if (!strcmpiW( section->name, section_name )) { UINT oldlen = len; for (key = section->key; key; key = key->next) @@ -988,11 +985,6 @@ static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name, if (!def_val) def_val = empty_strW; if (key_name) { - if (!key_name[0]) - { - PROFILE_CopyEntry(buffer, def_val, len, TRUE); - return strlenW(buffer); - } key = PROFILE_Find( &CurProfile->section, section, key_name, FALSE, FALSE); PROFILE_CopyEntry( buffer, (key && key->value) ? key->value : def_val, len, TRUE ); @@ -1002,7 +994,7 @@ static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name, return strlenW( buffer ); } /* no "else" here ! */ - if (section && section[0]) + if (section) { INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE); if (!buffer[0]) /* no luck -> def_val */ diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 4dbe129..e443b25 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -153,9 +153,7 @@ static void test_profile_string(void) /* works only in unicode, ascii crashes */ ret=GetPrivateProfileStringW(sW, emptyW, emptyW, bufW, ARRAY_SIZE(bufW), TESTFILE2W); - todo_wine ok(ret == 10, "expected 10, got %u\n", ret); - todo_wine ok(!lstrcmpW(valnokeyW,bufW), "expected %s, got %s\n", wine_dbgstr_w(valnokeyW), wine_dbgstr_w(bufW) );
1
0
0
0
Henri Verbeet : wined3d: Also update the "src_texture_gl" pointer when using a staging texture in the blitter.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 4a6314363ed61cf65fa0ea07ed80c627018f554c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a6314363ed61cf65fa0ea07…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 27 15:46:32 2019 +0430 wined3d: Also update the "src_texture_gl" pointer when using a staging texture in the blitter. Astutely spotted by Józef Kucia. This fixes a regression introduced by commit 961a94ac046644004718c56bfeeb81740cb73793. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a5279a5fba452d779cafc2cbd3098e9ed81598d9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/surface.c | 1 + 3 files changed, 3 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 37ec7e9..6dafdfd 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -7839,6 +7839,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl src_texture, src_sub_resource_idx, &upload_box); src_texture = staging_texture; + src_texture_gl = wined3d_texture_gl(src_texture); src_sub_resource_idx = 0; } else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index db6760e..6f3826f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -13228,6 +13228,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli src_texture, src_sub_resource_idx, &upload_box); src_texture = staging_texture; + src_texture_gl = wined3d_texture_gl(src_texture); src_sub_resource_idx = 0; } else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 0ee2f82..66253c2 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2220,6 +2220,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit src_texture, src_sub_resource_idx, &upload_box); src_texture = staging_texture; + src_texture_gl = wined3d_texture_gl(src_texture); src_sub_resource_idx = 0; } else
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
71
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
Results per page:
10
25
50
100
200