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
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2010
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
884 discussions
Start a n
N
ew thread
Henri Verbeet : ddraw: Remove a useless viewport callback.
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: fee9c1f2b5d00f6e75917f91536dfaf1e44243e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fee9c1f2b5d00f6e75917f915…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 17 19:03:25 2010 +0200 ddraw: Remove a useless viewport callback. --- dlls/ddraw/ddraw.c | 1 - dlls/ddraw/ddraw_private.h | 3 --- dlls/ddraw/device.c | 2 +- dlls/ddraw/executebuffer.c | 2 +- dlls/ddraw/viewport.c | 22 ++++++++++++---------- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 670129d..6f060e7 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4533,7 +4533,6 @@ static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 object->ref = 1; object->ddraw = ddraw_from_d3d3(iface); object->use_vp2 = 0xff; - object->activate = viewport_activate; TRACE("Created viewport %p.\n", object); *viewport = (IDirect3DViewport3 *)object; diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index bb95767..990d4f7 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -585,9 +585,6 @@ struct IDirect3DViewportImpl D3DVIEWPORT2 vp2; } viewports; - /* Activation function */ - void (*activate)(IDirect3DViewportImpl*, BOOL); - /* Field used to chain viewports together */ IDirect3DViewportImpl *next; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index a17627b..25ff428 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1872,7 +1872,7 @@ IDirect3DDeviceImpl_3_SetCurrentViewport(IDirect3DDevice3 *iface, /* Activate this viewport */ This->current_viewport->active_device = This; - This->current_viewport->activate(This->current_viewport, FALSE); + viewport_activate(This->current_viewport, FALSE); LeaveCriticalSection(&ddraw_cs); return D3D_OK; diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 9ae24a1..04f856a 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -103,7 +103,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, /* Activate the viewport */ lpViewport->active_device = lpDevice; - lpViewport->activate(lpViewport, FALSE); + viewport_activate(lpViewport, FALSE); TRACE("ExecuteData :\n"); if (TRACE_ON(d3d7)) diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 01319f5..403463b 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -325,8 +325,9 @@ IDirect3DViewportImpl_SetViewport(IDirect3DViewport3 *iface, if (This->active_device) { IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl; IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport); - if (current_viewport) { - if ((IDirect3DViewportImpl *)current_viewport == This) This->activate(This, FALSE); + if (current_viewport) + { + if ((IDirect3DViewportImpl *)current_viewport == This) viewport_activate(This, FALSE); IDirect3DViewport3_Release(current_viewport); } } @@ -697,7 +698,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface, /* Need to temporarily activate viewport to clear it. Previously active one will be restored afterwards. */ - This->activate(This, TRUE); + viewport_activate(This, TRUE); hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device, dwCount, lpRects, dwFlags & (D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET), color, 1.0, 0x00000000); @@ -705,7 +706,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface, IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport); if(current_viewport) { IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport; - vp->activate(vp, TRUE); + viewport_activate(vp, TRUE); IDirect3DViewport3_Release(current_viewport); } @@ -978,8 +979,9 @@ IDirect3DViewportImpl_SetViewport2(IDirect3DViewport3 *iface, if (This->active_device) { IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl; IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport); - if (current_viewport) { - if ((IDirect3DViewportImpl *)current_viewport == This) This->activate(This, FALSE); + if (current_viewport) + { + if ((IDirect3DViewportImpl *)current_viewport == This) viewport_activate(This, FALSE); IDirect3DViewport3_Release(current_viewport); } } @@ -1074,16 +1076,16 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface, return D3DERR_VIEWPORTHASNODEVICE; } d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl; - /* Need to temporarily activate viewport to clear it. Previously active one will be restored - afterwards. */ - This->activate(This, TRUE); + /* Need to temporarily activate viewport to clear it. Previously active + * one will be restored afterwards. */ + viewport_activate(This, TRUE); hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device, dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil); IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport); if(current_viewport) { IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport; - vp->activate(vp, TRUE); + viewport_activate(vp, TRUE); IDirect3DViewport3_Release(current_viewport); } LeaveCriticalSection(&ddraw_cs);
1
0
0
0
Henri Verbeet : ddraw: Remove a useless material callback.
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: 14399f6130a5594d21312f950de523f3d35f7868 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14399f6130a5594d21312f950…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 17 19:03:24 2010 +0200 ddraw: Remove a useless material callback. --- dlls/ddraw/ddraw.c | 1 - dlls/ddraw/ddraw_private.h | 2 -- dlls/ddraw/device.c | 2 +- dlls/ddraw/executebuffer.c | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index ff44960..670129d 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4457,7 +4457,6 @@ static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3 object->IDirect3DMaterial_vtbl = &IDirect3DMaterial_Vtbl; object->ref = 1; object->ddraw = ddraw_from_d3d3(iface); - object->activate = material_activate; TRACE("Created material %p.\n", object); *material = (IDirect3DMaterial3 *)object; diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 220d1bb..bb95767 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -550,8 +550,6 @@ struct IDirect3DMaterialImpl D3DMATERIAL mat; DWORD Handle; - - void (*activate)(IDirect3DMaterialImpl* this); }; /* VTables in various versions */ diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 6cd0f80..a17627b 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3044,7 +3044,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface, } TRACE(" activating material %p.\n", m); - m->activate(m); + material_activate(m); This->material = Value; } diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 59481b1..9ae24a1 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -261,7 +261,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, if (!m) ERR("Invalid material handle %#x.\n", ci->u2.dwArg[0]); else - m->activate(m); + material_activate(m); } else if (ci->u1.dlstLightStateType == D3DLIGHTSTATE_COLORMODEL /* 3 */) {
1
0
0
0
Henri Verbeet : ddraw: Remove useless light callbacks.
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: 06a44abc19b748b3cb4111e4696d6139247105e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=06a44abc19b748b3cb4111e46…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 17 19:03:23 2010 +0200 ddraw: Remove useless light callbacks. --- dlls/ddraw/ddraw.c | 5 -- dlls/ddraw/ddraw_private.h | 10 +--- dlls/ddraw/light.c | 137 +++++++++++++++++++++---------------------- dlls/ddraw/viewport.c | 15 +++-- 4 files changed, 77 insertions(+), 90 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 4921519..ff44960 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4397,11 +4397,6 @@ static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light object->ref = 1; object->ddraw = ddraw_from_d3d3(iface); - /* Update functions */ - object->activate = light_update; - object->desactivate = light_activate; - object->update = light_desactivate; - TRACE("Created light %p.\n", object); *light = (IDirect3DLight *)object; diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 9ff703d..220d1bb 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -525,20 +525,14 @@ struct IDirect3DLightImpl /* Chained list used for adding / removing from viewports */ IDirect3DLightImpl *next; - - /* Activation function */ - void (*activate)(IDirect3DLightImpl*); - void (*desactivate)(IDirect3DLightImpl*); - void (*update)(IDirect3DLightImpl*); }; /* Vtable */ extern const IDirect3DLightVtbl IDirect3DLight_Vtbl DECLSPEC_HIDDEN; /* Helper functions */ -void light_update(IDirect3DLightImpl *This) DECLSPEC_HIDDEN; -void light_activate(IDirect3DLightImpl *This) DECLSPEC_HIDDEN; -void light_desactivate(IDirect3DLightImpl *This) DECLSPEC_HIDDEN; +void light_activate(IDirect3DLightImpl *light) DECLSPEC_HIDDEN; +void light_deactivate(IDirect3DLightImpl *light) DECLSPEC_HIDDEN; /****************************************************************************** * IDirect3DMaterial implementation structure - Wraps to D3D7 diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c index 030dcf0..dd41ffe 100644 --- a/dlls/ddraw/light.c +++ b/dlls/ddraw/light.c @@ -44,6 +44,71 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d7); /***************************************************************************** + * light_update + * + * Updates the Direct3DDevice7 lighting parameters + * + *****************************************************************************/ +static void light_update(IDirect3DLightImpl *light) +{ + IDirect3DDeviceImpl *device; + + TRACE("light %p.\n", light); + + if (!light->active_viewport || !light->active_viewport->active_device) return; + device = light->active_viewport->active_device; + + IDirect3DDevice7_SetLight((IDirect3DDevice7 *)device, light->dwLightIndex, &light->light7); +} + +/***************************************************************************** + * light_activate + * + * Uses the Direct3DDevice7::LightEnable method to active the light + * + *****************************************************************************/ +void light_activate(IDirect3DLightImpl *light) +{ + IDirect3DDeviceImpl *device; + + TRACE("light %p.\n", light); + + if (!light->active_viewport || !light->active_viewport->active_device) return; + device = light->active_viewport->active_device; + + light_update(light); + if (!(light->light.dwFlags & D3DLIGHT_ACTIVE)) + { + IDirect3DDevice7_LightEnable((IDirect3DDevice7 *)device, light->dwLightIndex, TRUE); + light->light.dwFlags |= D3DLIGHT_ACTIVE; + } +} + +/***************************************************************************** + * + * light_deactivate + * + * Uses the Direct3DDevice7::LightEnable method to deactivate the light + * + *****************************************************************************/ +void light_deactivate(IDirect3DLightImpl *light) +{ + IDirect3DDeviceImpl *device; + + TRACE("light %p.\n", light); + + if (!light->active_viewport || !light->active_viewport->active_device) return; + device = light->active_viewport->active_device; + + /* If was not active, activate it */ + if (light->light.dwFlags & D3DLIGHT_ACTIVE) + { + IDirect3DDevice7_LightEnable((IDirect3DDevice7 *)device, light->dwLightIndex, FALSE); + light->light.dwFlags &= ~D3DLIGHT_ACTIVE; + } +} + +/***************************************************************************** * IUnknown Methods. *****************************************************************************/ @@ -203,9 +268,8 @@ IDirect3DLightImpl_SetLight(IDirect3DLight *iface, EnterCriticalSection(&ddraw_cs); memcpy(&This->light, lpLight, lpLight->dwSize); - if ((This->light.dwFlags & D3DLIGHT_ACTIVE) != 0) { - This->update(This); - } + if (This->light.dwFlags & D3DLIGHT_ACTIVE) + light_update(This); LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -240,73 +304,6 @@ IDirect3DLightImpl_GetLight(IDirect3DLight *iface, return DD_OK; } -/***************************************************************************** - * light_update - * - * Updates the Direct3DDevice7 lighting parameters - * - *****************************************************************************/ -void light_update(IDirect3DLightImpl* This) -{ - IDirect3DDeviceImpl* device; - - TRACE("(%p)\n", This); - - if (!This->active_viewport || !This->active_viewport->active_device) - return; - device = This->active_viewport->active_device; - - IDirect3DDevice7_SetLight((IDirect3DDevice7 *)device, This->dwLightIndex, &(This->light7)); -} - -/***************************************************************************** - * light_activate - * - * Uses the Direct3DDevice7::LightEnable method to active the light - * - *****************************************************************************/ -void light_activate(IDirect3DLightImpl* This) -{ - IDirect3DDeviceImpl* device; - - TRACE("(%p)\n", This); - - if (!This->active_viewport || !This->active_viewport->active_device) - return; - device = This->active_viewport->active_device; - - light_update(This); - /* If was not active, activate it */ - if ((This->light.dwFlags & D3DLIGHT_ACTIVE) == 0) { - IDirect3DDevice7_LightEnable((IDirect3DDevice7 *)device, This->dwLightIndex, TRUE); - This->light.dwFlags |= D3DLIGHT_ACTIVE; - } -} - -/***************************************************************************** - * - * light_desactivate - * - * Uses the Direct3DDevice7::LightEnable method to deactivate the light - * - *****************************************************************************/ -void light_desactivate(IDirect3DLightImpl* This) -{ - IDirect3DDeviceImpl* device; - - TRACE("(%p)\n", This); - - if (!This->active_viewport || !This->active_viewport->active_device) - return; - device = This->active_viewport->active_device; - - /* If was not active, activate it */ - if ((This->light.dwFlags & D3DLIGHT_ACTIVE) != 0) { - IDirect3DDevice7_LightEnable((IDirect3DDevice7 *)device, This->dwLightIndex, FALSE); - This->light.dwFlags &= ~D3DLIGHT_ACTIVE; - } -} - const IDirect3DLightVtbl IDirect3DLight_Vtbl = { /*** IUnknown Methods ***/ diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 5e17bd0..01319f5 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -62,8 +62,9 @@ void viewport_activate(IDirect3DViewportImpl* This, BOOL ignore_lights) { /* Activate all the lights associated with this context */ light = This->lights; - while (light != NULL) { - light->activate(light); + while (light) + { + light_activate(light); light = light->next; } } @@ -762,9 +763,8 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface, lpDirect3DLightImpl->active_viewport = This; /* If active, activate the light */ - if (This->active_device != NULL) { - lpDirect3DLightImpl->activate(lpDirect3DLightImpl); - } + if (This->active_device) + light_activate(lpDirect3DLightImpl); LeaveCriticalSection(&ddraw_cs); return D3D_OK; @@ -796,8 +796,9 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface, EnterCriticalSection(&ddraw_cs); cur_light = This->lights; while (cur_light != NULL) { - if (cur_light == lpDirect3DLightImpl) { - lpDirect3DLightImpl->desactivate(lpDirect3DLightImpl); + if (cur_light == lpDirect3DLightImpl) + { + light_deactivate(lpDirect3DLightImpl); if (prev_light == NULL) This->lights = cur_light->next; else prev_light->next = cur_light->next; /* Detach the light to the viewport */
1
0
0
0
Henri Verbeet : ddraw: Merge direct3d.c into ddraw.c.
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: 8394f0066144cbc7fe5634698fe6dafecf92aa27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8394f0066144cbc7fe5634698…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 17 19:03:22 2010 +0200 ddraw: Merge direct3d.c into ddraw.c. --- dlls/ddraw/Makefile.in | 1 - dlls/ddraw/ddraw.c | 1389 +++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/direct3d.c | 1608 ------------------------------------------------ 3 files changed, 1389 insertions(+), 1609 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8394f0066144cbc7fe563…
1
0
0
0
Henri Verbeet : wined3d: Add a TRACE to IWineD3DSurfaceImpl_LoadTexture().
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: f06b22a53765bcc0de288019139b360c9639c148 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f06b22a53765bcc0de2880191…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 17 19:03:21 2010 +0200 wined3d: Add a TRACE to IWineD3DSurfaceImpl_LoadTexture(). --- dlls/wined3d/surface.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 760eadf..ea66033 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2487,6 +2487,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; DWORD flag = srgb_mode ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE; + TRACE("iface %p, srgb %#x.\n", iface, srgb_mode); + if (!(This->Flags & flag)) { TRACE("Reloading because surface is dirty\n"); } else if(/* Reload: gl texture has ck, now no ckey is set OR */
1
0
0
0
Alexandre Julliard : explorer: Only run the systray timer when a systray icon is present.
by Alexandre Julliard
18 Aug '10
18 Aug '10
Module: wine Branch: master Commit: d8c022071aac960e4f1ba559f04911cfe435fba5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8c022071aac960e4f1ba559f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 18 09:31:26 2010 +0200 explorer: Only run the systray timer when a systray icon is present. --- programs/explorer/systray.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 9a4226a..615768f 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -340,6 +340,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) icon->owner = nid->hWnd; icon->display = -1; + if (list_empty( &icon_list )) SetTimer( tray_window, 1, 2000, NULL ); list_add_tail(&icon_list, &icon->entry); modify_icon( icon, nid ); @@ -355,6 +356,7 @@ static BOOL delete_icon(struct icon *icon) list_remove(&icon->entry); DestroyIcon(icon->image); HeapFree(GetProcessHeap(), 0, icon); + if (list_empty( &icon_list )) KillTimer( tray_window, 1 ); return TRUE; } @@ -596,6 +598,4 @@ void initialize_systray(void) } if (hide_systray) do_hide_systray(); - - SetTimer( tray_window, 1, 2000, NULL ); }
1
0
0
0
Damjan Jovanovic : winex11.drv: Implement the DataObject for dragging from X and dropping to OLE.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 1afc16e96201d52bd6de1e0c2ddd033e94a56989 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1afc16e96201d52bd6de1e0c2…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon Aug 16 21:11:08 2010 +0200 winex11.drv: Implement the DataObject for dragging from X and dropping to OLE. --- dlls/winex11.drv/Makefile.in | 2 +- dlls/winex11.drv/xdnd.c | 138 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 133 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/Makefile.in b/dlls/winex11.drv/Makefile.in index e9152c6..8a7598d 100644 --- a/dlls/winex11.drv/Makefile.in +++ b/dlls/winex11.drv/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winex11.drv IMPORTS = uuid user32 gdi32 advapi32 imm32 -DELAYIMPORTS = comctl32 ole32 +DELAYIMPORTS = comctl32 ole32 shell32 EXTRAINCL = @X_CFLAGS@ EXTRALIBS = @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index 9dda6be..526066f 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -903,6 +903,50 @@ static WCHAR* X11DRV_XDND_URIToDOS(char *encodedURI) return ret; } + +/************************************************************************** + * X11DRV_XDND_DescribeClipboardFormat + */ +static void X11DRV_XDND_DescribeClipboardFormat(int cfFormat, char *buffer, int size) +{ +#define D(x) case x: lstrcpynA(buffer, #x, size); return; + switch (cfFormat) + { + D(CF_TEXT) + D(CF_BITMAP) + D(CF_METAFILEPICT) + D(CF_SYLK) + D(CF_DIF) + D(CF_TIFF) + D(CF_OEMTEXT) + D(CF_DIB) + D(CF_PALETTE) + D(CF_PENDATA) + D(CF_RIFF) + D(CF_WAVE) + D(CF_UNICODETEXT) + D(CF_ENHMETAFILE) + D(CF_HDROP) + D(CF_LOCALE) + D(CF_DIBV5) + } +#undef D + + if (CF_PRIVATEFIRST <= cfFormat && cfFormat <= CF_PRIVATELAST) + { + lstrcpynA(buffer, "some private object", size); + return; + } + if (CF_GDIOBJFIRST <= cfFormat && cfFormat <= CF_GDIOBJLAST) + { + lstrcpynA(buffer, "some GDI object", size); + return; + } + + GetClipboardFormatNameA(cfFormat, buffer, size); +} + + /* The IDataObject singleton we feed to OLE follows */ static HRESULT WINAPI XDNDDATAOBJECT_QueryInterface(IDataObject *dataObject, @@ -935,8 +979,33 @@ static HRESULT WINAPI XDNDDATAOBJECT_GetData(IDataObject *dataObject, FORMATETC *formatEtc, STGMEDIUM *pMedium) { - FIXME("(%p, %p, %p): stub\n", dataObject, formatEtc, pMedium); - return E_NOTIMPL; + HRESULT hr; + char formatDesc[1024]; + + TRACE("(%p, %p, %p)\n", dataObject, formatEtc, pMedium); + X11DRV_XDND_DescribeClipboardFormat(formatEtc->cfFormat, + formatDesc, sizeof(formatDesc)); + TRACE("application is looking for %s\n", formatDesc); + + hr = IDataObject_QueryGetData(dataObject, formatEtc); + if (SUCCEEDED(hr)) + { + XDNDDATA *current; + LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry) + { + if (current->cf_win == formatEtc->cfFormat) + { + pMedium->tymed = TYMED_HGLOBAL; + pMedium->hGlobal = HeapAlloc(GetProcessHeap(), 0, current->size); + if (pMedium->hGlobal == NULL) + return E_OUTOFMEMORY; + memcpy(pMedium->hGlobal, current->data, current->size); + pMedium->pUnkForRelease = 0; + return S_OK; + } + } + } + return hr; } static HRESULT WINAPI XDNDDATAOBJECT_GetDataHere(IDataObject *dataObject, @@ -950,8 +1019,34 @@ static HRESULT WINAPI XDNDDATAOBJECT_GetDataHere(IDataObject *dataObject, static HRESULT WINAPI XDNDDATAOBJECT_QueryGetData(IDataObject *dataObject, FORMATETC *formatEtc) { - FIXME("(%p, %p): stub\n", dataObject, formatEtc); - return E_NOTIMPL; + char formatDesc[1024]; + XDNDDATA *current; + + TRACE("(%p, %p={.tymed=0x%x, .dwAspect=%d, .cfFormat=%d}\n", + dataObject, formatEtc, formatEtc->tymed, formatEtc->dwAspect, formatEtc->cfFormat); + X11DRV_XDND_DescribeClipboardFormat(formatEtc->cfFormat, formatDesc, sizeof(formatDesc)); + + if (formatEtc->tymed && !(formatEtc->tymed & TYMED_HGLOBAL)) + { + FIXME("only HGLOBAL medium types supported right now\n"); + return DV_E_TYMED; + } + if (formatEtc->dwAspect != DVASPECT_CONTENT) + { + FIXME("only the content aspect is supported right now\n"); + return E_NOTIMPL; + } + + LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry) + { + if (current->cf_win == formatEtc->cfFormat) + { + TRACE("application found %s\n", formatDesc); + return S_OK; + } + } + TRACE("application didn't find %s\n", formatDesc); + return DV_E_FORMATETC; } static HRESULT WINAPI XDNDDATAOBJECT_GetCanonicalFormatEtc(IDataObject *dataObject, @@ -976,8 +1071,39 @@ static HRESULT WINAPI XDNDDATAOBJECT_EnumFormatEtc(IDataObject *dataObject, DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc) { - FIXME("(%p, %u, %p): stub\n", dataObject, dwDirection, ppEnumFormatEtc); - return E_NOTIMPL; + DWORD count; + FORMATETC *formats; + + TRACE("(%p, %u, %p)\n", dataObject, dwDirection, ppEnumFormatEtc); + + if (dwDirection != DATADIR_GET) + { + FIXME("only the get direction is implemented\n"); + return E_NOTIMPL; + } + + count = list_count(&xdndData); + formats = HeapAlloc(GetProcessHeap(), 0, count * sizeof(FORMATETC)); + if (formats) + { + XDNDDATA *current; + DWORD i = 0; + HRESULT hr; + LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry) + { + formats[i].cfFormat = current->cf_win; + formats[i].ptd = NULL; + formats[i].dwAspect = DVASPECT_CONTENT; + formats[i].lindex = -1; + formats[i].tymed = TYMED_HGLOBAL; + i++; + } + hr = SHCreateStdEnumFmtEtc(count, formats, ppEnumFormatEtc); + HeapFree(GetProcessHeap(), 0, formats); + return hr; + } + else + return E_OUTOFMEMORY; } static HRESULT WINAPI XDNDDATAOBJECT_DAdvise(IDataObject *dataObject,
1
0
0
0
Damjan Jovanovic : winex11.drv: Implement a framework for dragging from X and dropping to OLE.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 685e66e51d5ad4f00c3ccff56104840510c6d9fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=685e66e51d5ad4f00c3ccff56…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon Aug 16 21:10:05 2010 +0200 winex11.drv: Implement a framework for dragging from X and dropping to OLE. --- dlls/winex11.drv/Makefile.in | 4 +- dlls/winex11.drv/xdnd.c | 350 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 345 insertions(+), 9 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=685e66e51d5ad4f00c3cc…
1
0
0
0
Damjan Jovanovic : winex11.drv: Filter out all CF_* formats when CF_HDROP is present.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 6871341c3c70c0054963d8fd9506e1aa71356293 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6871341c3c70c0054963d8fd9…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon Aug 16 21:08:49 2010 +0200 winex11.drv: Filter out all CF_* formats when CF_HDROP is present. --- dlls/winex11.drv/xdnd.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index ef8dd99..f0704da 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -257,6 +257,8 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm, unsigned long bytesret, icount; int entries = 0; unsigned char* data = NULL; + XDNDDATA *current, *next; + BOOL haveHDROP = FALSE; TRACE("count(%ld)\n", *count); @@ -301,6 +303,31 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm, wine_tsx11_unlock(); } + /* On Windows when there is a CF_HDROP, there are no other CF_ formats. + * foobar2000 relies on this (spaces -> %20's without it). + */ + LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry) + { + if (current->cf_win == CF_HDROP) + { + haveHDROP = TRUE; + break; + } + } + if (haveHDROP) + { + LIST_FOR_EACH_ENTRY_SAFE(current, next, &xdndData, XDNDDATA, entry) + { + if (current->cf_win != CF_HDROP && current->cf_win < CF_MAX) + { + list_remove(¤t->entry); + HeapFree(GetProcessHeap(), 0, current->data); + HeapFree(GetProcessHeap(), 0, current); + --entries; + } + } + } + *count = entries; }
1
0
0
0
Damjan Jovanovic : winex11.drv: Use a Wine list to store XDnD data.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: ac8c6f2944e2f80d040aa194b3da4d8d3558d01f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac8c6f2944e2f80d040aa194b…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon Aug 16 21:07:20 2010 +0200 winex11.drv: Use a Wine list to store XDnD data. --- dlls/winex11.drv/xdnd.c | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index 9d209fc..ef8dd99 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -39,6 +39,7 @@ #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/list.h" WINE_DEFAULT_DEBUG_CHANNEL(xdnd); @@ -52,10 +53,10 @@ typedef struct tagXDNDDATA Atom cf_xdnd; void *data; unsigned int size; - struct tagXDNDDATA *next; + struct list entry; } XDNDDATA, *LPXDNDDATA; -static LPXDNDDATA XDNDData = NULL; +static struct list xdndData = LIST_INIT(xdndData); static POINT XDNDxy = { 0, 0 }; static void X11DRV_XDND_InsertXDNDData(int property, int format, void* data, unsigned int len); @@ -316,12 +317,11 @@ static void X11DRV_XDND_InsertXDNDData(int property, int format, void* data, uns if (current) { EnterCriticalSection(&xdnd_cs); - current->next = XDNDData; current->cf_xdnd = property; current->cf_win = format; current->data = data; current->size = len; - XDNDData = current; + list_add_tail(&xdndData, ¤t->entry); LeaveCriticalSection(&xdnd_cs); } } @@ -484,21 +484,22 @@ static int X11DRV_XDND_DeconstructTextHTML(int property, void* data, int len) */ static void X11DRV_XDND_SendDropFiles(HWND hwnd) { - LPXDNDDATA current; + LPXDNDDATA current = NULL; + BOOL found = FALSE; EnterCriticalSection(&xdnd_cs); - current = XDNDData; - /* Find CF_HDROP type if any */ - while (current != NULL) + LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry) { if (current->cf_win == CF_HDROP) + { + found = TRUE; break; - current = current->next; + } } - if (current != NULL) + if (found) { DROPFILES *lpDrop = current->data; @@ -530,17 +531,13 @@ static void X11DRV_XDND_FreeDragDropOp(void) EnterCriticalSection(&xdnd_cs); - current = XDNDData; - /** Free data cache */ - while (current != NULL) + LIST_FOR_EACH_ENTRY_SAFE(current, next, &xdndData, XDNDDATA, entry) { - next = current->next; + list_remove(¤t->entry); HeapFree(GetProcessHeap(), 0, current); - current = next; } - XDNDData = NULL; XDNDxy.x = XDNDxy.y = 0; LeaveCriticalSection(&xdnd_cs);
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
89
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
Results per page:
10
25
50
100
200