winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2014
----- 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
530 discussions
Start a n
N
ew thread
Henri Verbeet : ddraw: User memory surfaces should be created with an explicit pitch.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: 162bc8db6e1bf0ba1222c0bfb09319313c803e29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=162bc8db6e1bf0ba1222c0bfb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 4 10:21:35 2014 +0100 ddraw: User memory surfaces should be created with an explicit pitch. --- dlls/ddraw/surface.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index e49454a..af578b3 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5812,11 +5812,21 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ * field. Frank Herbert's Dune specifies a NULL pointer for lpSurface. */ if ((desc->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD) || !desc->lpSurface) desc->dwFlags &= ~DDSD_LPSURFACE; - if ((desc->dwFlags & DDSD_LPSURFACE) && wined3d_desc.pool != WINED3D_POOL_SYSTEM_MEM) + if (desc->dwFlags & DDSD_LPSURFACE) { - WARN("User memory surfaces should be in the system memory pool.\n"); - HeapFree(GetProcessHeap(), 0, texture); - return DDERR_INVALIDCAPS; + if (wined3d_desc.pool != WINED3D_POOL_SYSTEM_MEM) + { + WARN("User memory surfaces should be in the system memory pool.\n"); + HeapFree(GetProcessHeap(), 0, texture); + return DDERR_INVALIDCAPS; + } + + if (!(desc->dwFlags & DDSD_PITCH)) + { + WARN("User memory surfaces should explicitly specify the pitch.\n"); + HeapFree(GetProcessHeap(), 0, texture); + return DDERR_INVALIDPARAMS; + } } if (desc->ddsCaps.dwCaps & (DDSCAPS_OVERLAY)) @@ -6057,17 +6067,9 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, s if (desc->dwFlags & DDSD_LPSURFACE) { - UINT pitch = 0; - - if (desc->dwFlags & DDSD_PITCH) - { - pitch = desc->u1.lPitch; - surface->surface_desc.u1.lPitch = pitch; - } - if (FAILED(hr = wined3d_surface_update_desc(wined3d_surface, wined3d_desc.width, wined3d_desc.height, wined3d_desc.format, WINED3D_MULTISAMPLE_NONE, 0, - desc->lpSurface, pitch))) + desc->lpSurface, desc->u1.lPitch))) { ERR("Failed to set surface memory, hr %#x.\n", hr); return hr;
1
0
0
0
Henri Verbeet : ddraw: User memory surfaces should be in the system memory pool.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: da2fafca8d504e8794c1d603f5feec1cfbf474f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da2fafca8d504e8794c1d603f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 4 10:21:34 2014 +0100 ddraw: User memory surfaces should be in the system memory pool. --- dlls/ddraw/surface.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index c503992..e49454a 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5531,11 +5531,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ /* Ensure DDSD_CAPS is always set. */ desc->dwFlags |= DDSD_CAPS; - /* If the surface is of the 'ALLOCONLOAD' type, ignore the LPSURFACE - * field. Frank Herbert's Dune specifies a NULL pointer for lpSurface. */ - if ((desc->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD) || !desc->lpSurface) - desc->dwFlags &= ~DDSD_LPSURFACE; - if (desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { DWORD flippable = desc->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_COMPLEX); @@ -5813,6 +5808,17 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ } } + /* If the surface is of the 'ALLOCONLOAD' type, ignore the LPSURFACE + * field. Frank Herbert's Dune specifies a NULL pointer for lpSurface. */ + if ((desc->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD) || !desc->lpSurface) + desc->dwFlags &= ~DDSD_LPSURFACE; + if ((desc->dwFlags & DDSD_LPSURFACE) && wined3d_desc.pool != WINED3D_POOL_SYSTEM_MEM) + { + WARN("User memory surfaces should be in the system memory pool.\n"); + HeapFree(GetProcessHeap(), 0, texture); + return DDERR_INVALIDCAPS; + } + if (desc->ddsCaps.dwCaps & (DDSCAPS_OVERLAY)) wined3d_desc.usage |= WINED3DUSAGE_OVERLAY;
1
0
0
0
Henri Verbeet : wined3d: Filter redundant WINED3D_MAP_DISCARD buffer maps.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: c1032e977bb9f850e3aea28dd79e3d7c2244cd6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1032e977bb9f850e3aea28dd…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 4 10:21:33 2014 +0100 wined3d: Filter redundant WINED3D_MAP_DISCARD buffer maps. --- dlls/ddraw/ddraw_private.h | 2 -- dlls/ddraw/device.c | 6 ------ dlls/ddraw/vertexbuffer.c | 5 +---- dlls/wined3d/buffer.c | 34 +++++++++++++++------------------- 4 files changed, 16 insertions(+), 31 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index fb3755f..0f7f755 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -543,8 +543,6 @@ struct d3d_vertex_buffer DWORD fvf; DWORD size; BOOL dynamic; - - BOOL read_since_last_map; }; HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **buffer, struct ddraw *ddraw, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 874d78d..e6f40a0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -4268,9 +4268,6 @@ static HRESULT d3d_device7_DrawPrimitiveVB(IDirect3DDevice7 *iface, D3DPRIMITIVE wined3d_device_set_primitive_type(device->wined3d_device, PrimitiveType); hr = wined3d_device_draw_primitive(device->wined3d_device, StartVertex, NumVertices); - if (SUCCEEDED(hr)) - vb->read_since_last_map = TRUE; - wined3d_mutex_unlock(); return hr; @@ -4396,9 +4393,6 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); hr = wined3d_device_draw_indexed_primitive(This->wined3d_device, ib_pos / sizeof(WORD), IndexCount); - if (SUCCEEDED(hr)) - vb->read_since_last_map = TRUE; - wined3d_mutex_unlock(); return hr; diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c index 5acd2e6..5d77790 100644 --- a/dlls/ddraw/vertexbuffer.c +++ b/dlls/ddraw/vertexbuffer.c @@ -245,7 +245,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface, wined3d_flags |= WINED3D_MAP_READONLY; if (flags & DDLOCK_NOOVERWRITE) wined3d_flags |= WINED3D_MAP_NOOVERWRITE; - if (flags & DDLOCK_DISCARDCONTENTS && buffer->read_since_last_map) + if (flags & DDLOCK_DISCARDCONTENTS) { wined3d_flags |= WINED3D_MAP_DISCARD; @@ -279,9 +279,6 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface, hr = wined3d_buffer_map(buffer->wineD3DVertexBuffer, 0, 0, (BYTE **)data, wined3d_flags); - if (SUCCEEDED(hr)) - buffer->read_since_last_map = FALSE; - wined3d_mutex_unlock(); return hr; diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index c53021b..fbbe398 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -944,13 +944,20 @@ struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffe HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags) { - BOOL dirty = buffer_is_dirty(buffer); LONG count; BYTE *base; TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags); flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags); + /* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture + * fill rate test seems to depend on this. When we map a buffer with + * GL_MAP_INVALIDATE_BUFFER_BIT, the driver is free to discard the + * previous contents of the buffer. The r600g driver only does this when + * the buffer is currently in use, while the proprietary NVIDIA driver + * appears to do this unconditionally. */ + if (buffer->flags & WINED3D_BUFFER_DISCARD) + flags &= ~WINED3D_MAP_DISCARD; count = ++buffer->resource.map_count; if (buffer->buffer_object) @@ -1026,25 +1033,14 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN context_release(context); } } - else - { - if (dirty) - { - if (buffer->flags & WINED3D_BUFFER_NOSYNC && !(flags & WINED3D_MAP_NOOVERWRITE)) - { - buffer->flags &= ~WINED3D_BUFFER_NOSYNC; - } - } - else if(flags & WINED3D_MAP_NOOVERWRITE) - { - buffer->flags |= WINED3D_BUFFER_NOSYNC; - } - if (flags & WINED3D_MAP_DISCARD) - { - buffer->flags |= WINED3D_BUFFER_DISCARD; - } - } + if (flags & WINED3D_MAP_DISCARD) + buffer->flags |= WINED3D_BUFFER_DISCARD; + + if (!(flags & WINED3D_MAP_NOOVERWRITE)) + buffer->flags &= ~WINED3D_BUFFER_NOSYNC; + else if (!buffer_is_dirty(buffer)) + buffer->flags |= WINED3D_BUFFER_NOSYNC; } base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.heap_memory;
1
0
0
0
Piotr Caban : ole32/tests: Fix DoDragDrop tests.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: 9f9fb6b7f1542f33f6ed18d882cfe088780e08d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f9fb6b7f1542f33f6ed18d88…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Mar 4 10:23:16 2014 +0100 ole32/tests: Fix DoDragDrop tests. --- dlls/ole32/tests/dragdrop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index 36328df..8051f58 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -485,7 +485,7 @@ static void test_DoDragDrop(void) HWND hwnd; RECT rect; - hwnd = CreateWindowA("WineOleTestClass", "Test", 0, + hwnd = CreateWindowExA(WS_EX_TOPMOST, "WineOleTestClass", "Test", 0, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, NULL, NULL); ok(IsWindow(hwnd), "failed to create window\n");
1
0
0
0
Nikolay Sivov : msxml3: Added partial implementation of IVBSAXContentHandler for MXWriter.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: d745e612accdb831112e0363ed3e483ec0c76aac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d745e612accdb831112e0363e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 4 10:57:26 2014 +0400 msxml3: Added partial implementation of IVBSAXContentHandler for MXWriter. --- dlls/msxml3/mxwriter.c | 186 +++++++++++++++++++++++++++++++++++++++++ dlls/msxml3/tests/saxreader.c | 33 +++++++- 2 files changed, 216 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d745e612accdb831112e0…
1
0
0
0
Stefan Leichter : comdlg32: Update version resource to values reported from XP.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: 73a2408f27a7454f9fccd3558dd20286d52eda25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73a2408f27a7454f9fccd3558…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Mon Mar 3 23:19:30 2014 +0100 comdlg32: Update version resource to values reported from XP. --- dlls/comdlg32/comdlg32.rc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/comdlg32.rc b/dlls/comdlg32/comdlg32.rc index 6942194..32eded5 100644 --- a/dlls/comdlg32/comdlg32.rc +++ b/dlls/comdlg32/comdlg32.rc @@ -497,8 +497,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define WINE_FILEDESCRIPTION_STR "Common Dialog Boxes" #define WINE_FILENAME_STR "comdlg32.dll" -#define WINE_FILEVERSION 4,0,0,950 /* Maybe 4.1.0.980 for win98?? */ -#define WINE_FILEVERSION_STR "4.0" +#define WINE_FILEVERSION 6,0,2900,5512 +#define WINE_FILEVERSION_STR "6.00.2900.5512" +#define WINE_PRODUCTVERSION 6,0,2900,5512 +#define WINE_PRODUCTVERSION_STR "6.00.2900.5512" #include "wine/wine_common_ver.rc"
1
0
0
0
Michael Stefaniuc : avifil32: Avoid forward declarations of COM methods.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: 9f2f30c4124817dc294891f3b09259c825f06e3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f2f30c4124817dc294891f3b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Mar 3 22:12:34 2014 +0100 avifil32: Avoid forward declarations of COM methods. --- dlls/avifil32/wavfile.c | 174 +++++++++++++++++++---------------------------- 1 file changed, 69 insertions(+), 105 deletions(-) diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index 00b18b3..60dab03 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -87,84 +87,6 @@ typedef struct { /***********************************************************************/ -static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile* iface,REFIID refiid,LPVOID *obj); -static ULONG WINAPI IAVIFile_fnAddRef(IAVIFile* iface); -static ULONG WINAPI IAVIFile_fnRelease(IAVIFile* iface); -static HRESULT WINAPI IAVIFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size); -static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam); -static HRESULT WINAPI IAVIFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVISTREAMINFOW*asi); -static HRESULT WINAPI IAVIFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size); -static HRESULT WINAPI IAVIFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size); -static HRESULT WINAPI IAVIFile_fnEndRecord(IAVIFile*iface); -static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam); - -static const struct IAVIFileVtbl iwavft = { - IAVIFile_fnQueryInterface, - IAVIFile_fnAddRef, - IAVIFile_fnRelease, - IAVIFile_fnInfo, - IAVIFile_fnGetStream, - IAVIFile_fnCreateStream, - IAVIFile_fnWriteData, - IAVIFile_fnReadData, - IAVIFile_fnEndRecord, - IAVIFile_fnDeleteStream -}; - -static HRESULT WINAPI IPersistFile_fnQueryInterface(IPersistFile*iface,REFIID refiid,LPVOID*obj); -static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile*iface); -static ULONG WINAPI IPersistFile_fnRelease(IPersistFile*iface); -static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile*iface,CLSID*pClassID); -static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile*iface); -static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile*iface,LPCOLESTR pszFileName,DWORD dwMode); -static HRESULT WINAPI IPersistFile_fnSave(IPersistFile*iface,LPCOLESTR pszFileName,BOOL fRemember); -static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile*iface,LPCOLESTR pszFileName); -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile*iface,LPOLESTR*ppszFileName); - -static const struct IPersistFileVtbl iwavpft = { - IPersistFile_fnQueryInterface, - IPersistFile_fnAddRef, - IPersistFile_fnRelease, - IPersistFile_fnGetClassID, - IPersistFile_fnIsDirty, - IPersistFile_fnLoad, - IPersistFile_fnSave, - IPersistFile_fnSaveCompleted, - IPersistFile_fnGetCurFile -}; - -static HRESULT WINAPI IAVIStream_fnQueryInterface(IAVIStream*iface,REFIID refiid,LPVOID *obj); -static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream*iface); -static ULONG WINAPI IAVIStream_fnRelease(IAVIStream* iface); -static HRESULT WINAPI IAVIStream_fnCreate(IAVIStream*iface,LPARAM lParam1,LPARAM lParam2); -static HRESULT WINAPI IAVIStream_fnInfo(IAVIStream*iface,AVISTREAMINFOW *psi,LONG size); -static LONG WINAPI IAVIStream_fnFindSample(IAVIStream*iface,LONG pos,LONG flags); -static HRESULT WINAPI IAVIStream_fnReadFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG *formatsize); -static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream*iface,LONG pos,LPVOID format,LONG formatsize); -static HRESULT WINAPI IAVIStream_fnRead(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread); -static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream*iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten); -static HRESULT WINAPI IAVIStream_fnDelete(IAVIStream*iface,LONG start,LONG samples); -static HRESULT WINAPI IAVIStream_fnReadData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG *lpread); -static HRESULT WINAPI IAVIStream_fnWriteData(IAVIStream*iface,DWORD fcc,LPVOID lp,LONG size); -static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream*iface,AVISTREAMINFOW*info,LONG infolen); - -static const struct IAVIStreamVtbl iwavst = { - IAVIStream_fnQueryInterface, - IAVIStream_fnAddRef, - IAVIStream_fnRelease, - IAVIStream_fnCreate, - IAVIStream_fnInfo, - IAVIStream_fnFindSample, - IAVIStream_fnReadFormat, - IAVIStream_fnSetFormat, - IAVIStream_fnRead, - IAVIStream_fnWrite, - IAVIStream_fnDelete, - IAVIStream_fnReadData, - IAVIStream_fnWriteData, - IAVIStream_fnSetInfo -}; - typedef struct _IAVIFileImpl { IUnknown IUnknown_inner; IAVIFile IAVIFile_iface; @@ -273,33 +195,6 @@ static const IUnknownVtbl unk_vtbl = IUnknown_fnRelease }; -HRESULT AVIFILE_CreateWAVFile(IUnknown *outer_unk, REFIID riid, void **ret_iface) -{ - IAVIFileImpl *pfile; - HRESULT hr; - - *ret_iface = NULL; - - pfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAVIFileImpl)); - if (pfile == NULL) - return AVIERR_MEMORY; - - pfile->IUnknown_inner.lpVtbl = &unk_vtbl; - pfile->IAVIFile_iface.lpVtbl = &iwavft; - pfile->IPersistFile_iface.lpVtbl = &iwavpft; - pfile->IAVIStream_iface.lpVtbl = &iwavst; - pfile->ref = 1; - if (outer_unk) - pfile->outer_unk = outer_unk; - else - pfile->outer_unk = &pfile->IUnknown_inner; - - hr = IUnknown_QueryInterface(&pfile->IUnknown_inner, riid, ret_iface); - IUnknown_Release(&pfile->IUnknown_inner); - - return hr; -} - static inline IAVIFileImpl *impl_from_IAVIFile(IAVIFile *iface) { return CONTAINING_RECORD(iface, IAVIFileImpl, IAVIFile_iface); @@ -515,6 +410,19 @@ static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile *iface, DWORD fccType, LO return AVIERR_OK; } +static const struct IAVIFileVtbl iwavft = { + IAVIFile_fnQueryInterface, + IAVIFile_fnAddRef, + IAVIFile_fnRelease, + IAVIFile_fnInfo, + IAVIFile_fnGetStream, + IAVIFile_fnCreateStream, + IAVIFile_fnWriteData, + IAVIFile_fnReadData, + IAVIFile_fnEndRecord, + IAVIFile_fnDeleteStream +}; + /***********************************************************************/ static inline IAVIFileImpl *impl_from_IPersistFile(IPersistFile *iface) @@ -673,6 +581,18 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface, LPOLESTR *p return AVIERR_OK; } +static const struct IPersistFileVtbl iwavpft = { + IPersistFile_fnQueryInterface, + IPersistFile_fnAddRef, + IPersistFile_fnRelease, + IPersistFile_fnGetClassID, + IPersistFile_fnIsDirty, + IPersistFile_fnLoad, + IPersistFile_fnSave, + IPersistFile_fnSaveCompleted, + IPersistFile_fnGetCurFile +}; + /***********************************************************************/ static inline IAVIFileImpl *impl_from_IAVIStream(IAVIStream *iface) @@ -1039,6 +959,50 @@ static HRESULT WINAPI IAVIStream_fnSetInfo(IAVIStream *iface, return E_FAIL; } +static const struct IAVIStreamVtbl iwavst = { + IAVIStream_fnQueryInterface, + IAVIStream_fnAddRef, + IAVIStream_fnRelease, + IAVIStream_fnCreate, + IAVIStream_fnInfo, + IAVIStream_fnFindSample, + IAVIStream_fnReadFormat, + IAVIStream_fnSetFormat, + IAVIStream_fnRead, + IAVIStream_fnWrite, + IAVIStream_fnDelete, + IAVIStream_fnReadData, + IAVIStream_fnWriteData, + IAVIStream_fnSetInfo +}; + +HRESULT AVIFILE_CreateWAVFile(IUnknown *outer_unk, REFIID riid, void **ret_iface) +{ + IAVIFileImpl *pfile; + HRESULT hr; + + *ret_iface = NULL; + + pfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pfile)); + if (!pfile) + return AVIERR_MEMORY; + + pfile->IUnknown_inner.lpVtbl = &unk_vtbl; + pfile->IAVIFile_iface.lpVtbl = &iwavft; + pfile->IPersistFile_iface.lpVtbl = &iwavpft; + pfile->IAVIStream_iface.lpVtbl = &iwavst; + pfile->ref = 1; + if (outer_unk) + pfile->outer_unk = outer_unk; + else + pfile->outer_unk = &pfile->IUnknown_inner; + + hr = IUnknown_QueryInterface(&pfile->IUnknown_inner, riid, ret_iface); + IUnknown_Release(&pfile->IUnknown_inner); + + return hr; +} + /***********************************************************************/ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
1
0
0
0
Michael Stefaniuc : avifil32: Merge IAVIStream into the WAVFile object.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: 5c12f6bdc972a1fd9e0998894501948c6b8bd784 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c12f6bdc972a1fd9e0998894…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Mar 3 22:10:31 2014 +0100 avifil32: Merge IAVIStream into the WAVFile object. --- dlls/avifil32/wavfile.c | 132 +++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 80 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5c12f6bdc972a1fd9e099…
1
0
0
0
Michael Stefaniuc : avifil32: Merge IPersistFile into the WAVFile object.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: fbd740b7b12795775d6533c3836455d669033bff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbd740b7b12795775d6533c38…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Mar 3 22:08:05 2014 +0100 avifil32: Merge IPersistFile into the WAVFile object. --- dlls/avifil32/wavfile.c | 68 +++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 43 deletions(-) diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index 8ea63c9..e2c66cb 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -167,14 +167,6 @@ static const struct IAVIStreamVtbl iwavst = { typedef struct _IAVIFileImpl IAVIFileImpl; -typedef struct _IPersistFileImpl { - /* IUnknown stuff */ - const IPersistFileVtbl *lpVtbl; - - /* IPersistFile stuff */ - IAVIFileImpl *paf; -} IPersistFileImpl; - typedef struct _IAVIStreamImpl { /* IUnknown stuff */ const IAVIStreamVtbl *lpVtbl; @@ -185,12 +177,12 @@ typedef struct _IAVIStreamImpl { struct _IAVIFileImpl { IAVIFile IAVIFile_iface; + IPersistFile IPersistFile_iface; IUnknown IUnknown_inner; IUnknown *outer_unk; LONG ref; /* IAVIFile, IAVIStream stuff... */ - IPersistFileImpl iPersistFile; IAVIStreamImpl iAVIStream; AVIFILEINFOW fInfo; @@ -234,7 +226,7 @@ static HRESULT WINAPI IUnknown_fnQueryInterface(IUnknown *iface, REFIID riid, vo else if (IsEqualGUID(&IID_IAVIStream, riid)) *ret_iface = &This->iAVIStream; else if (IsEqualGUID(&IID_IPersistFile, riid)) - *ret_iface = &This->iPersistFile; + *ret_iface = &This->IPersistFile_iface; else { WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ret_iface); *ret_iface = NULL; @@ -306,7 +298,7 @@ HRESULT AVIFILE_CreateWAVFile(IUnknown *outer_unk, REFIID riid, void **ret_iface pfile->IUnknown_inner.lpVtbl = &unk_vtbl; pfile->IAVIFile_iface.lpVtbl = &iwavft; - pfile->iPersistFile.lpVtbl = &iwavpft; + pfile->IPersistFile_iface.lpVtbl = &iwavpft; pfile->iAVIStream.lpVtbl = &iwavst; pfile->ref = 1; if (outer_unk) @@ -314,7 +306,6 @@ HRESULT AVIFILE_CreateWAVFile(IUnknown *outer_unk, REFIID riid, void **ret_iface else pfile->outer_unk = &pfile->IUnknown_inner; - pfile->iPersistFile.paf = pfile; pfile->iAVIStream.paf = pfile; hr = IUnknown_QueryInterface(&pfile->IUnknown_inner, riid, ret_iface); @@ -540,32 +531,31 @@ static HRESULT WINAPI IAVIFile_fnDeleteStream(IAVIFile *iface, DWORD fccType, LO /***********************************************************************/ -static HRESULT WINAPI IPersistFile_fnQueryInterface(IPersistFile *iface, - REFIID refiid, LPVOID *obj) +static inline IAVIFileImpl *impl_from_IPersistFile(IPersistFile *iface) { - IPersistFileImpl *This = (IPersistFileImpl *)iface; + return CONTAINING_RECORD(iface, IAVIFileImpl, IPersistFile_iface); +} - assert(This->paf != NULL); +static HRESULT WINAPI IPersistFile_fnQueryInterface(IPersistFile *iface, REFIID riid, + void **ret_iface) +{ + IAVIFileImpl *This = impl_from_IPersistFile(iface); - return IAVIFile_QueryInterface((PAVIFILE)This->paf, refiid, obj); + return IUnknown_QueryInterface(This->outer_unk, riid, ret_iface); } static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile *iface) { - IPersistFileImpl *This = (IPersistFileImpl *)iface; - - assert(This->paf != NULL); + IAVIFileImpl *This = impl_from_IPersistFile(iface); - return IAVIFile_AddRef((PAVIFILE)This->paf); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI IPersistFile_fnRelease(IPersistFile *iface) { - IPersistFileImpl *This = (IPersistFileImpl *)iface; - - assert(This->paf != NULL); + IAVIFileImpl *This = impl_from_IPersistFile(iface); - return IAVIFile_Release((PAVIFILE)This->paf); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface, @@ -583,20 +573,16 @@ static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface, static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile *iface) { - IPersistFileImpl *This = (IPersistFileImpl *)iface; + IAVIFileImpl *This = impl_from_IPersistFile(iface); - TRACE("(%p)\n", iface); + TRACE("(%p)\n", iface); - assert(This->paf != NULL); - - return (This->paf->fDirty ? S_OK : S_FALSE); + return (This->fDirty ? S_OK : S_FALSE); } -static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, - LPCOLESTR pszFileName, DWORD dwMode) +static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, LPCOLESTR pszFileName, DWORD dwMode) { - IAVIFileImpl *This = ((IPersistFileImpl*)iface)->paf; - + IAVIFileImpl *This = impl_from_IPersistFile(iface); WCHAR wszStreamFmt[50]; INT len; @@ -606,7 +592,6 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, if (pszFileName == NULL) return AVIERR_BADPARAM; - assert(This != NULL); if (This->hmmio != NULL) return AVIERR_ERROR; /* No reuse of this object for another file! */ @@ -678,10 +663,9 @@ static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile *iface, return AVIERR_OK; } -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface, - LPOLESTR *ppszFileName) +static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface, LPOLESTR *ppszFileName) { - IPersistFileImpl *This = (IPersistFileImpl *)iface; + IAVIFileImpl *This = impl_from_IPersistFile(iface); TRACE("(%p,%p)\n", iface, ppszFileName); @@ -690,16 +674,14 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface, *ppszFileName = NULL; - assert(This->paf != NULL); - - if (This->paf->szFileName != NULL) { - int len = lstrlenW(This->paf->szFileName) + 1; + if (This->szFileName) { + int len = lstrlenW(This->szFileName) + 1; *ppszFileName = CoTaskMemAlloc(len * sizeof(WCHAR)); if (*ppszFileName == NULL) return AVIERR_MEMORY; - strcpyW(*ppszFileName, This->paf->szFileName); + strcpyW(*ppszFileName, This->szFileName); } return AVIERR_OK;
1
0
0
0
Michael Stefaniuc : avifil32/tests: Add WAVFile COM tests.
by Alexandre Julliard
04 Mar '14
04 Mar '14
Module: wine Branch: master Commit: b1c6d5b111f879650b4840e05b1464ed304e7676 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1c6d5b111f879650b4840e05…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Mar 3 22:06:15 2014 +0100 avifil32/tests: Add WAVFile COM tests. --- dlls/avifil32/tests/api.c | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c index c2a2d24..552a356 100644 --- a/dlls/avifil32/tests/api.c +++ b/dlls/avifil32/tests/api.c @@ -29,6 +29,7 @@ /* ########################### */ +DEFINE_AVIGUID(CLSID_WAVFile, 0x00020003, 0, 0); static const CHAR winetest0[] = "winetest0"; static const CHAR winetest1[] = "winetest1"; static const CHAR testfilename[] = "wine_avifil32_test.avi"; @@ -648,6 +649,67 @@ static void test_COM(void) while (IAVIFile_Release(avif)); } +static void test_COM_wavfile(void) +{ + struct unk_impl unk_obj = {{&unk_vtbl}, 19, NULL}; + IAVIFile *avif = NULL; + IPersistFile *pf; + IAVIStream *avis; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_WAVFile, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&unk_obj.inner_unk); + ok(hr == S_OK, "COM aggregation failed: %08x, expected S_OK\n", hr); + hr = IUnknown_QueryInterface(&unk_obj.IUnknown_iface, &IID_IAVIFile, (void**)&avif); + ok(hr == S_OK, "QueryInterface for IID_IAVIFile failed: %08x\n", hr); + refcount = IAVIFile_AddRef(avif); + ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); + refcount = IAVIFile_Release(avif); + ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); + hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + refcount = IPersistFile_Release(pf); + ok(refcount == unk_obj.ref, "WAVFile just pretends to support COM aggregation\n"); + refcount = IAVIFile_Release(avif); + ok(refcount == 19, "Outer ref count should be back at 19 but is %d\n", refcount); + refcount = IUnknown_Release(unk_obj.inner_unk); + ok(refcount == 0, "Inner ref count should be 0 but is %u\n", refcount); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_WAVFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIStreaming, + (void**)&avif); + ok(hr == E_NOINTERFACE, "WAVFile create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all WAVFile interfaces */ + hr = CoCreateInstance(&CLSID_WAVFile, NULL, CLSCTX_INPROC_SERVER, &IID_IAVIFile, (void**)&avif); + ok(hr == S_OK, "WAVFile create failed: %08x, expected S_OK\n", hr); + refcount = IAVIFile_AddRef(avif); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IAVIFile_QueryInterface(avif, &IID_IPersistFile, (void**)&pf); + ok(hr == S_OK, "QueryInterface for IID_IPersistFile failed: %08x\n", hr); + refcount = IPersistFile_AddRef(pf); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IPersistFile_Release(pf); + + hr = IAVIFile_QueryInterface(avif, &IID_IAVIStream, (void**)&avis); + ok(hr == S_OK, "QueryInterface for IID_IAVIStream failed: %08x\n", hr); + refcount = IAVIStream_AddRef(avis); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IAVIStream_Release(avis); + + hr = IAVIFile_QueryInterface(avif, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + refcount = IUnknown_Release(unk); + + while (IAVIFile_Release(avif)); +} + START_TEST(api) { @@ -659,6 +721,7 @@ START_TEST(api) test_ash1_corruption(); test_ash1_corruption2(); test_COM(); + test_COM_wavfile(); AVIFileExit(); }
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
52
53
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
Results per page:
10
25
50
100
200