winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2012
----- 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
718 discussions
Start a n
N
ew thread
Henri Verbeet : ddraw: Remove some interfaces from IDirect3DDeviceImpl_7_QueryInterface().
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: 1a98c339cab03f1465725e6952db99001e1b0717 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a98c339cab03f1465725e695…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 3 21:15:14 2012 +0200 ddraw: Remove some interfaces from IDirect3DDeviceImpl_7_QueryInterface(). --- dlls/ddraw/device.c | 44 -------------------------------------------- 1 files changed, 0 insertions(+), 44 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 2f4b728..a1daa3f 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -117,50 +117,6 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface, *obj = iface; } - /* Check DirectDraw Interfaces. */ - else if( IsEqualGUID( &IID_IDirectDraw7, refiid ) ) - { - *obj = &This->ddraw->IDirectDraw7_iface; - TRACE("(%p) Returning IDirectDraw7 interface at %p\n", This, *obj); - } - else if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) - { - *obj = &This->ddraw->IDirectDraw4_iface; - TRACE("(%p) Returning IDirectDraw4 interface at %p\n", This, *obj); - } - else if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) - { - *obj = &This->ddraw->IDirectDraw2_iface; - TRACE("(%p) Returning IDirectDraw2 interface at %p\n", This, *obj); - } - else if( IsEqualGUID( &IID_IDirectDraw, refiid ) ) - { - *obj = &This->ddraw->IDirectDraw_iface; - TRACE("(%p) Returning IDirectDraw interface at %p\n", This, *obj); - } - - /* Direct3D */ - else if ( IsEqualGUID( &IID_IDirect3D , refiid ) ) - { - *obj = &This->ddraw->IDirect3D_iface; - TRACE("(%p) Returning IDirect3D interface at %p\n", This, *obj); - } - else if ( IsEqualGUID( &IID_IDirect3D2 , refiid ) ) - { - *obj = &This->ddraw->IDirect3D2_iface; - TRACE("(%p) Returning IDirect3D2 interface at %p\n", This, *obj); - } - else if ( IsEqualGUID( &IID_IDirect3D3 , refiid ) ) - { - *obj = &This->ddraw->IDirect3D3_iface; - TRACE("(%p) Returning IDirect3D3 interface at %p\n", This, *obj); - } - else if ( IsEqualGUID( &IID_IDirect3D7 , refiid ) ) - { - *obj = &This->ddraw->IDirect3D7_iface; - TRACE("(%p) Returning IDirect3D7 interface at %p\n", This, *obj); - } - /* Direct3DDevice */ else if ( IsEqualGUID( &IID_IDirect3DDevice , refiid ) ) {
1
0
0
0
Henri Verbeet : ddraw: Replace an ERR in IDirect3DDeviceImpl_7_QueryInterface() with a WARN.
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: cd8508a915bd57bfa4a59b76c05a0f0987a4dcd8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd8508a915bd57bfa4a59b76c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 3 21:15:13 2012 +0200 ddraw: Replace an ERR in IDirect3DDeviceImpl_7_QueryInterface() with a WARN. --- dlls/ddraw/device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index b656ab0..2f4b728 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -190,7 +190,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface, /* Unknown interface */ else { - ERR("(%p)->(%s, %p): No interface found\n", This, debugstr_guid(refiid), obj); + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(refiid)); return E_NOINTERFACE; }
1
0
0
0
Henri Verbeet : ddraw: Keep track of the ddraw version used to create a device.
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: 4f91eb3fe125f80fe148ba2ad74deeeb6ccd78d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f91eb3fe125f80fe148ba2ad…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 3 21:15:12 2012 +0200 ddraw: Keep track of the ddraw version used to create a device. This also obsoletes the "from_surface" device field. --- dlls/ddraw/ddraw.c | 74 +++++++++++++------------------------------ dlls/ddraw/ddraw_private.h | 8 ++-- dlls/ddraw/device.c | 50 ++++++++++++++++++++++++++++- dlls/ddraw/surface.c | 12 +++---- 4 files changed, 80 insertions(+), 64 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 0df790f..9d68fc9 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4426,50 +4426,17 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device); wined3d_mutex_lock(); - *device = NULL; - - /* Fail device creation if non-opengl surfaces are used. */ - if (DefaultSurfaceType != WINED3D_SURFACE_TYPE_OPENGL) - { - ERR("The application wants to create a Direct3D device, but non-opengl surfaces are set in the registry.\n"); - ERR("Please set the surface implementation to opengl or autodetection to allow 3D rendering.\n"); - - /* We only hit this path if a default surface is set in the registry. Incorrect autodetection - * is caught in CreateSurface or QueryInterface. */ - wined3d_mutex_unlock(); - return DDERR_NO3D; - } - - if (ddraw->d3ddevice) - { - FIXME("Only one Direct3D device per DirectDraw object supported.\n"); - wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; - } - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) + hr = d3d_device_create(ddraw, target, 7, &object); + if (SUCCEEDED(hr)) + *device = &object->IDirect3DDevice7_iface; + else { - ERR("Failed to allocate device memory.\n"); - wined3d_mutex_unlock(); - return DDERR_OUTOFMEMORY; + WARN("Failed to create device, hr %#x.\n", hr); + *device = NULL; } - - hr = d3d_device_init(object, ddraw, target); - if (FAILED(hr)) - { - WARN("Failed to initialize device, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - wined3d_mutex_unlock(); - return hr; - } - - TRACE("Created device %p.\n", object); - *device = &object->IDirect3DDevice7_iface; - wined3d_mutex_unlock(); - return D3D_OK; + return hr; } static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid, @@ -4477,22 +4444,25 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid, { struct ddraw_surface *surface_impl = unsafe_impl_from_IDirectDrawSurface4(surface); struct ddraw *ddraw = impl_from_IDirect3D3(iface); - IDirect3DDevice7 *device7; IDirect3DDeviceImpl *device_impl; HRESULT hr; TRACE("iface %p, riid %s, surface %p, device %p, outer_unknown %p.\n", iface, debugstr_guid(riid), surface, device, outer_unknown); - if (outer_unknown) return CLASS_E_NOAGGREGATION; + if (outer_unknown) + return CLASS_E_NOAGGREGATION; - hr = d3d7_CreateDevice(&ddraw->IDirect3D7_iface, riid, - surface_impl ? &surface_impl->IDirectDrawSurface7_iface : NULL, device ? &device7 : NULL); + wined3d_mutex_lock(); + hr = d3d_device_create(ddraw, surface_impl, 3, &device_impl); if (SUCCEEDED(hr)) - { - device_impl = impl_from_IDirect3DDevice7(device7); *device = &device_impl->IDirect3DDevice3_iface; + else + { + WARN("Failed to create device, hr %#x.\n", hr); + *device = NULL; } + wined3d_mutex_unlock(); return hr; } @@ -4502,20 +4472,22 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid, { struct ddraw_surface *surface_impl = unsafe_impl_from_IDirectDrawSurface(surface); struct ddraw *ddraw = impl_from_IDirect3D2(iface); - IDirect3DDevice7 *device7; IDirect3DDeviceImpl *device_impl; HRESULT hr; TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device); - hr = d3d7_CreateDevice(&ddraw->IDirect3D7_iface, riid, - surface_impl ? &surface_impl->IDirectDrawSurface7_iface : NULL, device ? &device7 : NULL); + wined3d_mutex_lock(); + hr = d3d_device_create(ddraw, surface_impl, 2, &device_impl); if (SUCCEEDED(hr)) - { - device_impl = impl_from_IDirect3DDevice7(device7); *device = &device_impl->IDirect3DDevice2_iface; + else + { + WARN("Failed to create device, hr %#x.\n", hr); + *device = NULL; } + wined3d_mutex_unlock(); return hr; } diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index fa0f144..d7873e8 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -278,7 +278,8 @@ struct IDirect3DDeviceImpl IDirect3DDevice3 IDirect3DDevice3_iface; IDirect3DDevice2 IDirect3DDevice2_iface; IDirect3DDevice IDirect3DDevice_iface; - LONG ref; + LONG ref; + UINT version; /* Other object connections */ struct wined3d_device *wined3d_device; @@ -293,7 +294,6 @@ struct IDirect3DDeviceImpl /* Required to keep track which of two available texture blending modes in d3ddevice3 is used */ BOOL legacyTextureBlending; - BOOL from_surface; D3DMATRIX legacy_projection; D3DMATRIX legacy_clipspace; @@ -315,8 +315,8 @@ struct IDirect3DDeviceImpl D3DMATRIXHANDLE world, proj, view; }; -HRESULT d3d_device_init(IDirect3DDeviceImpl *device, struct ddraw *ddraw, - struct ddraw_surface *target) DECLSPEC_HIDDEN; +HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, + UINT version, IDirect3DDeviceImpl **device) DECLSPEC_HIDDEN; /* The IID */ extern const GUID IID_D3DDEVICE_WineD3D DECLSPEC_HIDDEN; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 8f65dc5..b656ab0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -33,6 +33,7 @@ #include "ddraw_private.h" WINE_DEFAULT_DEBUG_CHANNEL(ddraw); +WINE_DECLARE_DEBUG_CHANNEL(winediag); /* The device ID */ const GUID IID_D3DDEVICE_WineD3D = { @@ -180,7 +181,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface, } /* DirectDrawSurface */ - else if (IsEqualGUID(&IID_IDirectDrawSurface, refiid) && This->from_surface) + else if (IsEqualGUID(&IID_IDirectDrawSurface, refiid) && This->version == 1) { *obj = &This->target->IDirectDrawSurface_iface; TRACE("Returning IDirectDrawSurface interface %p.\n", *obj); @@ -7015,7 +7016,8 @@ enum wined3d_depth_buffer_type IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DD return WINED3D_ZB_TRUE; } -HRESULT d3d_device_init(IDirect3DDeviceImpl *device, struct ddraw *ddraw, struct ddraw_surface *target) +static HRESULT d3d_device_init(IDirect3DDeviceImpl *device, struct ddraw *ddraw, + struct ddraw_surface *target, UINT version) { static const D3DMATRIX ident = { @@ -7035,6 +7037,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, struct ddraw *ddraw, struct device->IDirect3DDevice2_iface.lpVtbl = &d3d_device2_vtbl; device->IDirect3DDevice_iface.lpVtbl = &d3d_device1_vtbl; device->ref = 1; + device->version = version; device->ddraw = ddraw; device->target = target; list_init(&device->viewport_list); @@ -7092,3 +7095,46 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, struct ddraw *ddraw, struct return D3D_OK; } + +HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, + UINT version, IDirect3DDeviceImpl **device) +{ + IDirect3DDeviceImpl *object; + HRESULT hr; + + TRACE("ddraw %p, target %p, version %u, device %p.\n", ddraw, target, version, device); + + if (DefaultSurfaceType != WINED3D_SURFACE_TYPE_OPENGL) + { + ERR_(winediag)("The application wants to create a Direct3D device, " + "but the current DirectDrawRenderer does not support this.\n"); + + return DDERR_NO3D; + } + + if (ddraw->d3ddevice) + { + FIXME("Only one Direct3D device per DirectDraw object supported.\n"); + return DDERR_INVALIDPARAMS; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate device memory.\n"); + return DDERR_OUTOFMEMORY; + } + + hr = d3d_device_init(object, ddraw, target, version); + if (FAILED(hr)) + { + WARN("Failed to initialize device, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created device %p.\n", object); + *device = object; + + return D3D_OK; +} diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index d5b57c0..1d614ac 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -204,21 +204,19 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, || IsEqualGUID(riid, &IID_IDirect3DHALDevice) || IsEqualGUID(riid, &IID_IDirect3DRGBDevice)) { - IDirect3DDeviceImpl *device_impl; - IDirect3DDevice7 *device; + IDirect3DDeviceImpl *device; HRESULT hr; - hr = IDirect3D7_CreateDevice(&This->ddraw->IDirect3D7_iface, riid, - &This->IDirectDrawSurface7_iface, &device); + wined3d_mutex_lock(); + hr = d3d_device_create(This->ddraw, This, 1, &device); + wined3d_mutex_unlock(); if (FAILED(hr)) { WARN("Failed to create device, hr %#x.\n", hr); return hr; } - device_impl = impl_from_IDirect3DDevice7(device); - device_impl->from_surface = TRUE; - *obj = &device_impl->IDirect3DDevice_iface; + *obj = &device->IDirect3DDevice_iface; return S_OK; }
1
0
0
0
Henri Verbeet : ntdll: Use the copy of the section headers for applying memory protections as well in map_image ().
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: f1651e9208f51dcc8ebf599e8675bbf869541130 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1651e9208f51dcc8ebf599e8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 3 21:15:11 2012 +0200 ntdll: Use the copy of the section headers for applying memory protections as well in map_image(). --- dlls/ntdll/virtual.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 450a1fb..7c2b1a9 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1348,7 +1348,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz VIRTUAL_SetProt( view, ptr, ROUND_SIZE( 0, header_size ), VPROT_COMMITTED | VPROT_READ ); - sec = (IMAGE_SECTION_HEADER*)((char *)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader); + sec = sections; for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++) { SIZE_T size;
1
0
0
0
Henri Verbeet : ntdll: Free the correct section headers copy in map_image() .
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: 31eff0665477699c41248c9d47d6eaa062d435d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31eff0665477699c41248c9d4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 3 21:15:10 2012 +0200 ntdll: Free the correct section headers copy in map_image(). --- dlls/ntdll/virtual.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 5271d18..450a1fb 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1122,7 +1122,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz { IMAGE_DOS_HEADER *dos; IMAGE_NT_HEADERS *nt; - IMAGE_SECTION_HEADER *sec = NULL; + IMAGE_SECTION_HEADER *sec, *sections = NULL; IMAGE_DATA_DIRECTORY *imports; NTSTATUS status = STATUS_CONFLICTING_ADDRESSES; int i; @@ -1168,16 +1168,17 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz memset( ptr + header_size, 0, header_end - (ptr + header_size) ); if ((char *)(nt + 1) > header_end) goto error; header_start = (char*)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader; - if (header_start + sizeof(*sec) * nt->FileHeader.NumberOfSections > header_end) goto error; + if (header_start + sizeof(*sections) * nt->FileHeader.NumberOfSections > header_end) goto error; /* Some applications (e.g. the Steam version of Borderlands) map over the top of the section headers, * copying the headers into local memory is necessary to properly load such applications. */ - sec = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*sec) * nt->FileHeader.NumberOfSections); - if (!sec) + sections = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*sections) * nt->FileHeader.NumberOfSections); + if (!sections) { status = STATUS_NO_MEMORY; goto error; } - memcpy(sec, header_start, sizeof(*sec) * nt->FileHeader.NumberOfSections); + memcpy(sections, header_start, sizeof(*sections) * nt->FileHeader.NumberOfSections); + sec = sections; imports = nt->OptionalHeader.DataDirectory + IMAGE_DIRECTORY_ENTRY_IMPORT; if (!imports->Size || !imports->VirtualAddress) imports = NULL; @@ -1373,7 +1374,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz } done: - RtlFreeHeap( GetProcessHeap(), 0, sec ); + RtlFreeHeap( GetProcessHeap(), 0, sections ); view->mapping = dup_mapping; view->map_protect = map_vprot; server_leave_uninterrupted_section( &csVirtual, &sigset ); @@ -1386,7 +1387,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz return STATUS_SUCCESS; error: - RtlFreeHeap( GetProcessHeap(), 0, sec ); + RtlFreeHeap( GetProcessHeap(), 0, sections ); if (view) delete_view( view ); server_leave_uninterrupted_section( &csVirtual, &sigset ); if (dup_mapping) NtClose( dup_mapping );
1
0
0
0
Christian Costa : amstream: Implement IAMMultiMediaStreamImpl_SetState.
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: 27c4ad3bec1229020ab38ab5b45f0969204192ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27c4ad3bec1229020ab38ab5b…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Apr 3 07:53:50 2012 +0200 amstream: Implement IAMMultiMediaStreamImpl_SetState. --- dlls/amstream/amstream.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 1366cdb..150f412 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -184,13 +184,19 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* ifac return E_NOTIMPL; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE NewState) +static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE new_state) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); + HRESULT hr = E_INVALIDARG; - FIXME("(%p/%p)->() stub!\n", This, iface); + TRACE("(%p/%p)->(%u)\n", This, iface, new_state); - return E_NOTIMPL; + if (STREAMSTATE_RUN) + hr = IMediaControl_Run(This->media_control); + else if (STREAMSTATE_STOP) + hr = IMediaControl_Stop(This->media_control); + + return hr; } static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime)
1
0
0
0
Christian Costa : amstream: Implement IAMMultiMediaStreamImpl_Seek.
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: efff5abfb1701ba63d6e21f7ed510e4e1557591d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efff5abfb1701ba63d6e21f7e…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Apr 3 07:53:43 2012 +0200 amstream: Implement IAMMultiMediaStreamImpl_Seek. --- dlls/amstream/amstream.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 89ea46b..1366cdb 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -211,13 +211,13 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* i return E_NOTIMPL; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME SeekTime) +static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME seek_time) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); - FIXME("(%p/%p)->() stub!\n", This, iface); + TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time)); - return E_NOTIMPL; + return IMediaSeeking_SetPositions(This->media_seeking, &seek_time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); } static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS)
1
0
0
0
Christian Costa : amstream: Add CLSID_AMAudioData implementation.
by Alexandre Julliard
04 Apr '12
04 Apr '12
Module: wine Branch: master Commit: 0f8553b5d4411b324f8116547d1202620f618531 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f8553b5d4411b324f8116547…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Tue Apr 3 17:51:07 2012 +0200 amstream: Add CLSID_AMAudioData implementation. --- dlls/amstream/Makefile.in | 1 + dlls/amstream/amstream_classes.idl | 7 ++ dlls/amstream/amstream_private.h | 2 + dlls/amstream/audiodata.c | 157 ++++++++++++++++++++++++++++++++++++ dlls/amstream/main.c | 1 + dlls/amstream/tests/amstream.c | 2 +- 6 files changed, 169 insertions(+), 1 deletions(-) diff --git a/dlls/amstream/Makefile.in b/dlls/amstream/Makefile.in index 3353a38..35cfae1 100644 --- a/dlls/amstream/Makefile.in +++ b/dlls/amstream/Makefile.in @@ -3,6 +3,7 @@ IMPORTS = strmiids strmbase uuid ole32 advapi32 C_SRCS = \ amstream.c \ + audiodata.c \ main.c \ mediastream.c \ mediastreamfilter.c diff --git a/dlls/amstream/amstream_classes.idl b/dlls/amstream/amstream_classes.idl index 701275d..064ce00 100644 --- a/dlls/amstream/amstream_classes.idl +++ b/dlls/amstream/amstream_classes.idl @@ -38,3 +38,10 @@ coclass AMDirectDrawStream { interface IAMMultiMediaStream; } uuid(49c47ce5-9ba4-11d0-8212-00c04fc32c45) ] coclass AMMultiMediaStream { interface IAMMultiMediaStream; } + +[ + helpstring("AuStream Class"), + threading(both), + uuid(f2468580-af8a-11d0-8212-00c04fc32c45) +] +coclass AMAudioData { interface IAudioData; } diff --git a/dlls/amstream/amstream_private.h b/dlls/amstream/amstream_private.h index 69fd23f..e40c409 100644 --- a/dlls/amstream/amstream_private.h +++ b/dlls/amstream/amstream_private.h @@ -30,8 +30,10 @@ #include "winuser.h" #include "dshow.h" #include "mmstream.h" +#include "austream.h" HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; +HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN; diff --git a/dlls/amstream/audiodata.c b/dlls/amstream/audiodata.c new file mode 100644 index 0000000..7d3c38a --- /dev/null +++ b/dlls/amstream/audiodata.c @@ -0,0 +1,157 @@ +/* + * Implementation of IAudioData Interface + * + * Copyright 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/debug.h" + +#define COBJMACROS + +#include "winbase.h" +#include "amstream_private.h" + +#include "amstream.h" + +WINE_DEFAULT_DEBUG_CHANNEL(amstream); + +typedef struct { + IAudioData IAudioData_iface; + LONG ref; +} AMAudioDataImpl; + +static inline AMAudioDataImpl *impl_from_IAudioData(IAudioData *iface) +{ + return CONTAINING_RECORD(iface, AMAudioDataImpl, IAudioData_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IAudioDataImpl_QueryInterface(IAudioData *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMemoryData) || + IsEqualGUID(riid, &IID_IAudioData)) + { + IUnknown_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI IAudioDataImpl_AddRef(IAudioData* iface) +{ + AMAudioDataImpl *This = impl_from_IAudioData(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, This->ref); + + return ref; +} + +static ULONG WINAPI IAudioDataImpl_Release(IAudioData* iface) +{ + AMAudioDataImpl *This = impl_from_IAudioData(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, This->ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMemoryData methods ***/ +static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BYTE *data, DWORD flags) +{ + FIXME("(%p)->(%u,%p,%x): stub\n", iface, size, data, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_GetInfo(IAudioData* iface, DWORD *length, BYTE **data, DWORD *actual_data) +{ + FIXME("(%p)->(%p,%p,%p): stub\n", iface, length, data, actual_data); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_SetActual(IAudioData* iface, DWORD data_valid) +{ + FIXME("(%p)->(%u): stub\n", iface, data_valid); + + return E_NOTIMPL; +} + +/*** IAudioData methods ***/ +static HRESULT WINAPI IAudioDataImpl_GetFormat(IAudioData* iface, WAVEFORMATEX *wave_format_current) +{ + FIXME("(%p)->(%p): stub\n", iface, wave_format_current); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_SetFormat(IAudioData* iface, const WAVEFORMATEX *wave_format) +{ + FIXME("(%p)->(%p): stub\n", iface, wave_format); + + return E_NOTIMPL; +} + +static const struct IAudioDataVtbl AudioData_Vtbl = +{ + /*** IUnknown methods ***/ + IAudioDataImpl_QueryInterface, + IAudioDataImpl_AddRef, + IAudioDataImpl_Release, + /*** IMemoryData methods ***/ + IAudioDataImpl_SetBuffer, + IAudioDataImpl_GetInfo, + IAudioDataImpl_SetActual, + /*** IAudioData methods ***/ + IAudioDataImpl_GetFormat, + IAudioDataImpl_SetFormat +}; + +HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) +{ + AMAudioDataImpl *object; + + TRACE("(%p,%p)\n", pUnkOuter, ppObj); + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AMAudioDataImpl)); + if (!object) + { + ERR("Out of memory\n"); + return E_OUTOFMEMORY; + } + + object->IAudioData_iface.lpVtbl = &AudioData_Vtbl; + object->ref = 1; + + *ppObj = &object->IAudioData_iface; + + return S_OK; +} diff --git a/dlls/amstream/main.c b/dlls/amstream/main.c index 9f23974..79142e5 100644 --- a/dlls/amstream/main.c +++ b/dlls/amstream/main.c @@ -75,6 +75,7 @@ static const struct object_creation_info object_creation[] = { { &CLSID_AMMultiMediaStream, AM_create }, { &CLSID_AMDirectDrawStream, AM_create }, + { &CLSID_AMAudioData, AMAudioData_create }, { &CLSID_MediaStreamFilter, MediaStreamFilter_create } }; diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 39add30..87bbcc7 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -334,7 +334,7 @@ static void test_media_streams(void) { IAudioData* audio_data = NULL; hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data); - todo_wine ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); + ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); hr = IAudioMediaStream_CreateSample(audio_media_stream, NULL, 0, &audio_sample); todo_wine ok(hr == E_POINTER, "IAudioMediaStream_CreateSample returned: %x\n", hr);
1
0
0
0
Piotr Caban : wininet: Set uninitialized memmory to 0xdeadbeef in cache files.
by Alexandre Julliard
03 Apr '12
03 Apr '12
Module: wine Branch: master Commit: e4ad164f6e2b66c26a96c83b593e2b8684369459 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4ad164f6e2b66c26a96c83b5…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 3 16:46:07 2012 +0200 wininet: Set uninitialized memmory to 0xdeadbeef in cache files. --- dlls/wininet/urlcache.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 3a404c8..f5fcf10 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -811,6 +811,8 @@ static BOOL URLCache_FindFirstFreeEntry(URLCACHE_HEADER * pHeader, DWORD dwBlock for (index = 0; index < dwBlocksNeeded; index++) URLCache_Allocation_BlockAllocate(AllocationTable, dwBlockNumber + index); *ppEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + ENTRY_START_OFFSET + dwBlockNumber * BLOCKSIZE); + for (index = 0; index < dwBlocksNeeded * BLOCKSIZE / sizeof(DWORD); index++) + ((DWORD*)*ppEntry)[index] = 0xdeadbeef; (*ppEntry)->dwBlocksUsed = dwBlocksNeeded; return TRUE; } @@ -1398,6 +1400,7 @@ static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ pHeader->dwOffsetFirstHashTable = dwOffset; (*ppHash)->CacheFileEntry.dwSignature = HASH_SIGNATURE; (*ppHash)->CacheFileEntry.dwBlocksUsed = 0x20; + (*ppHash)->dwAddressNext = 0; (*ppHash)->dwHashTableNumber = pPrevHash ? pPrevHash->dwHashTableNumber + 1 : 0; for (i = 0; i < HASHTABLE_SIZE; i++) {
1
0
0
0
Piotr Caban : wininet: Mark empty fields in the same way while hash table is created and element is removed .
by Alexandre Julliard
03 Apr '12
03 Apr '12
Module: wine Branch: master Commit: edcc395dac99cf9d66f9c334284c471b7d010f19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edcc395dac99cf9d66f9c3342…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 3 16:45:29 2012 +0200 wininet: Mark empty fields in the same way while hash table is created and element is removed. --- dlls/wininet/urlcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 9e1f779..3a404c8 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -1401,7 +1401,7 @@ static DWORD URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ (*ppHash)->dwHashTableNumber = pPrevHash ? pPrevHash->dwHashTableNumber + 1 : 0; for (i = 0; i < HASHTABLE_SIZE; i++) { - (*ppHash)->HashTable[i].dwOffsetEntry = 0; + (*ppHash)->HashTable[i].dwOffsetEntry = HASHTABLE_FREE; (*ppHash)->HashTable[i].dwHashKey = HASHTABLE_FREE; } return ERROR_SUCCESS;
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
72
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
Results per page:
10
25
50
100
200