ReactOS.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
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
List overview
Download
Ros-diffs
July 2015
----- 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
ros-diffs@reactos.org
13 participants
257 discussions
Start a n
N
ew thread
[akhaldi] 68524: [DXGI] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:27:21 2015 New Revision: 68524 URL:
http://svn.reactos.org/svn/reactos?rev=68524&view=rev
Log: [DXGI] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/dxgi/factory.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dxgi/factory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxgi/fact…
============================================================================== --- trunk/reactos/dll/directx/wine/dxgi/factory.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dxgi/factory.c [iso-8859-1] Tue Jul 21 23:27:21 2015 @@ -226,6 +226,7 @@ wined3d_desc.flags = 0; /* WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL? */ wined3d_desc.refresh_rate = dxgi_rational_to_uint(&desc->BufferDesc.RefreshRate); wined3d_desc.swap_interval = WINED3DPRESENT_INTERVAL_DEFAULT; + wined3d_desc.auto_restore_display_mode = TRUE; hr = IWineDXGIDevice_create_swapchain(dxgi_device, &wined3d_desc, &wined3d_swapchain); IWineDXGIDevice_Release(dxgi_device); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:27:21 2015 @@ -37,7 +37,7 @@ reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29 reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.7.47 -reactos/dll/directx/wine/dxgi # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/dxgi # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/qedit # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/quartz # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68523: [DXDIAGN_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:25:58 2015 New Revision: 68523 URL:
http://svn.reactos.org/svn/reactos?rev=68523&view=rev
Log: [DXDIAGN_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/dxdiagn/container.c Modified: trunk/rostests/winetests/dxdiagn/container.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dxdiagn/contain…
============================================================================== --- trunk/rostests/winetests/dxdiagn/container.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dxdiagn/container.c [iso-8859-1] Tue Jul 21 23:25:58 2015 @@ -701,6 +701,7 @@ IDxDiagContainer_AddRef(child); ref = IDxDiagContainer_Release(child); ok(ref == 2, "Expected reference count to be 2, got %u\n", ref); + IDxDiagContainer_Release(child); IDxDiagContainer_Release(child); cleanup: @@ -1010,6 +1011,7 @@ trace("Testing container %s\n", wine_dbgstr_w(child_container)); test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0])); } + IDxDiagContainer_Release(child); } cleanup:
9 years, 5 months
1
0
0
0
[akhaldi] 68522: [DXDIAGN] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:25:41 2015 New Revision: 68522 URL:
http://svn.reactos.org/svn/reactos?rev=68522&view=rev
Log: [DXDIAGN] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/dxdiagn/dxdiag_main.c trunk/reactos/dll/directx/wine/dxdiagn/provider.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dxdiagn/dxdiag_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/d…
============================================================================== --- trunk/reactos/dll/directx/wine/dxdiagn/dxdiag_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dxdiagn/dxdiag_main.c [iso-8859-1] Tue Jul 21 23:25:41 2015 @@ -54,6 +54,12 @@ TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv); else if (IsEqualGUID(&IID_IClassFactory, riid)) TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv); + else if (IsEqualGUID(&IID_IExternalConnection, riid) || + IsEqualGUID(&IID_IMarshal, riid)) { + TRACE("(%p)->(%s) ignoring\n", iface, debugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; + } else { FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); *ppv = NULL; Modified: trunk/reactos/dll/directx/wine/dxdiagn/provider.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/p…
============================================================================== --- trunk/reactos/dll/directx/wine/dxdiagn/provider.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dxdiagn/provider.c [iso-8859-1] Tue Jul 21 23:25:41 2015 @@ -904,6 +904,7 @@ static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0}; static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; + static const WCHAR bNoHardware[] = {'b','N','o','H','a','r','d','w','a','r','e',0}; D3DADAPTER_IDENTIFIER9 adapter_info; D3DDISPLAYMODE adapter_mode; @@ -1047,6 +1048,10 @@ goto cleanup; hr = add_bool_property(display_adapter, bDDAccelerationEnabled, hardware_accel); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(display_adapter, bNoHardware, FALSE); if (FAILED(hr)) goto cleanup; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:25:41 2015 @@ -36,7 +36,7 @@ reactos/dll/directx/wine/dplay # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29 -reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dxgi # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/qedit # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68521: [DMUSIC] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:24:15 2015 New Revision: 68521 URL:
http://svn.reactos.org/svn/reactos?rev=68521&view=rev
Log: [DMUSIC] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/dmusic/dmobject.c trunk/reactos/dll/directx/wine/dmusic/dmobject.h trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dmusic/dmobject.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmobject.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmobject.c [iso-8859-1] Tue Jul 21 23:24:15 2015 @@ -1,5 +1,6 @@ /* * Base IDirectMusicObject Implementation + * Keep in sync with the master in dlls/dmusic/dmobject.c * * Copyright (C) 2003-2004 Rok Mandeljc * Copyright (C) 2014 Michael Stefaniuc @@ -128,6 +129,20 @@ return IUnknown_Release(This->outer_unk); } +HRESULT WINAPI dmobj_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class) +{ + struct dmobject *This = impl_from_IPersistStream(iface); + + TRACE("(%p, %p)\n", This, class); + + if (!class) + return E_POINTER; + + *class = This->desc.guidClass; + + return S_OK; +} + /* IPersistStream methods not implemented in native */ HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class) { Modified: trunk/reactos/dll/directx/wine/dmusic/dmobject.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmobject.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmobject.h [iso-8859-1] Tue Jul 21 23:24:15 2015 @@ -1,5 +1,6 @@ /* * Base IDirectMusicObject Implementation + * Keep in sync with the master in dlls/dmusic/dmobject.h * * Copyright (C) 2014 Michael Stefaniuc * @@ -44,6 +45,7 @@ void **ret_iface) DECLSPEC_HIDDEN; ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface) DECLSPEC_HIDDEN; ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface) DECLSPEC_HIDDEN; +HRESULT WINAPI dmobj_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class) DECLSPEC_HIDDEN; /* IPersistStream methods not implemented in native */ HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, Modified: trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h [iso-8859-1] Tue Jul 21 23:24:15 2015 @@ -252,10 +252,6 @@ /***************************************************************************** * Misc. */ -/* my custom ICOM stuff */ -#define ICOM_NAME_MULTI(impl,field,iface,name) impl* const name=(impl*)((char*)(iface) - offsetof(impl,field)) -#define ICOM_THIS_MULTI(impl,field,iface) ICOM_NAME_MULTI(impl,field,iface,This) - /* for simpler reading */ typedef struct _DMUS_PRIVATE_CHUNK { FOURCC fccID; /* FOURCC ID of the chunk */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:24:15 2015 @@ -32,7 +32,7 @@ reactos/dll/directx/wine/devenum # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.7.37 -reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dplay # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
9 years, 5 months
1
0
0
0
[akhaldi] 68520: [DINPUT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:23:09 2015 New Revision: 68520 URL:
http://svn.reactos.org/svn/reactos?rev=68520&view=rev
Log: [DINPUT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/dinput/joystick.c trunk/rostests/winetests/dinput/keyboard.c Modified: trunk/rostests/winetests/dinput/joystick.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/joystick…
============================================================================== --- trunk/rostests/winetests/dinput/joystick.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dinput/joystick.c [iso-8859-1] Tue Jul 21 23:23:09 2015 @@ -540,7 +540,6 @@ dip_gain_set.diph.dwHeaderSize = sizeof(DIPROPHEADER); dip_gain_set.diph.dwObj = 0; dip_gain_set.diph.dwHow = DIPH_DEVICE; - dip_gain_set.dwData = 10000; dip_gain_get.diph.dwSize = sizeof(DIPROPDWORD); dip_gain_get.diph.dwHeaderSize = sizeof(DIPROPHEADER); dip_gain_get.diph.dwObj = 0; Modified: trunk/rostests/winetests/dinput/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/keyboard…
============================================================================== --- trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] Tue Jul 21 23:23:09 2015 @@ -95,6 +95,27 @@ for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++) ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]); + /* simulate some keyboard input */ + SetFocus(hwnd); + keybd_event('Q', 0, 0, 0); + hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state); + ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %08x\n", hr); + if (!custom_state[0]) + win_skip("Keyboard event not processed, skipping test\n"); + else + { + /* unacquiring should reset the device state */ + hr = IDirectInputDevice_Unacquire(pKeyboard); + ok(SUCCEEDED(hr), "IDirectInputDevice_Unacquire() failed: %08x\n", hr); + hr = IDirectInputDevice_Acquire(pKeyboard); + ok(SUCCEEDED(hr), "IDirectInputDevice_Acquire() failed: %08x\n", hr); + hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state); + ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState failed: %08x\n", hr); + for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++) + ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]); + } + keybd_event('Q', 0, KEYEVENTF_KEYUP, 0); + if (pKeyboard) IUnknown_Release(pKeyboard); }
9 years, 5 months
1
0
0
0
[akhaldi] 68519: [DINPUT] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:22:55 2015 New Revision: 68519 URL:
http://svn.reactos.org/svn/reactos?rev=68519&view=rev
Log: [DINPUT] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/dinput/device.c trunk/reactos/dll/directx/wine/dinput/device_private.h trunk/reactos/dll/directx/wine/dinput/joystick.c trunk/reactos/dll/directx/wine/dinput/joystick_linux.c trunk/reactos/dll/directx/wine/dinput/keyboard.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dinput/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/de…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -852,7 +852,7 @@ /* Save the settings to disk */ save_mapping_settings(iface, lpdiaf, username); - return IDirectInputDevice8WImpl_SetActionMap(iface, lpdiaf, lpszUserName, dwFlags); + return DI_OK; } /****************************************************************************** @@ -1617,8 +1617,14 @@ IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); if (!This->acquired) return DIERR_NOTACQUIRED; - /* Because wine devices do not need to be polled, just return DI_NOEFFECT */ + +#ifndef __REACTOS__ + __wine_check_for_events( QS_ALLINPUT ); + return DI_OK; +#else + /* Devices do not need to be polled on ReactOS. */ return DI_NOEFFECT; +#endif } HRESULT WINAPI IDirectInputDevice2AImpl_Poll(LPDIRECTINPUTDEVICE8A iface) @@ -1705,16 +1711,6 @@ return DI_OK; } -HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, - LPDIACTIONFORMATW lpdiaf, - LPCWSTR lpszUserName, - DWORD dwFlags) -{ - FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); - - return DI_OK; -} - HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) { Modified: trunk/reactos/dll/directx/wine/dinput/device_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/de…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/device_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/device_private.h [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -235,10 +235,6 @@ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN; -extern HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, - LPDIACTIONFORMATW lpdiaf, - LPCWSTR lpszUserName, - DWORD dwFlags) DECLSPEC_HIDDEN; extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) DECLSPEC_HIDDEN; extern HRESULT WINAPI IDirectInputDevice8WImpl_GetImageInfo(LPDIRECTINPUTDEVICE8W iface, Modified: trunk/reactos/dll/directx/wine/dinput/joystick.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -28,6 +28,8 @@ #include "dinput_private.h" +#include <stdio.h> + #include "joystick_private.h" static inline JoystickGenericImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface) @@ -407,13 +409,13 @@ TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags); switch(type) { - /* Directx <= 7 definitions */ + /* Direct X <= 7 definitions */ DEBUG_TYPE(DIDEVTYPE_DEVICE); DEBUG_TYPE(DIDEVTYPE_MOUSE); DEBUG_TYPE(DIDEVTYPE_KEYBOARD); DEBUG_TYPE(DIDEVTYPE_JOYSTICK); DEBUG_TYPE(DIDEVTYPE_HID); - /* Directx >= 8 definitions */ + /* Direct X >= 8 definitions */ DEBUG_TYPE(DI8DEVTYPE_DEVICE); DEBUG_TYPE(DI8DEVTYPE_MOUSE); DEBUG_TYPE(DI8DEVTYPE_KEYBOARD); @@ -606,6 +608,8 @@ LPDIDEVICEINSTANCEA pdidi) { JoystickGenericImpl *This = impl_from_IDirectInputDevice8A(iface); + DIPROPDWORD pd; + DWORD index = 0; TRACE("(%p,%p)\n", iface, pdidi); @@ -619,13 +623,21 @@ WARN("invalid parameter: pdidi->dwSize = %d\n", pdidi->dwSize); return DIERR_INVALIDPARAM; } + + /* Try to get joystick index */ + pd.diph.dwSize = sizeof(pd); + pd.diph.dwHeaderSize = sizeof(pd.diph); + pd.diph.dwObj = 0; + pd.diph.dwHow = DIPH_DEVICE; + if (SUCCEEDED(IDirectInputDevice2_GetProperty(iface, DIPROP_JOYSTICKID, &pd.diph))) + index = pd.dwData; /* Return joystick */ pdidi->guidInstance = This->guidInstance; pdidi->guidProduct = This->guidProduct; /* we only support traditional joysticks for now */ pdidi->dwDevType = This->devcaps.dwDevType; - strcpy(pdidi->tszInstanceName, "Joystick"); + snprintf(pdidi->tszInstanceName, MAX_PATH, "Joystick %d", index); strcpy(pdidi->tszProductName, This->name); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3A)) { pdidi->guidFFDriver = GUID_NULL; @@ -644,6 +656,9 @@ LPDIDEVICEINSTANCEW pdidi) { JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); + CHAR buffer[MAX_PATH]; + DIPROPDWORD pd; + DWORD index = 0; TRACE("(%p,%p)\n", iface, pdidi); @@ -652,13 +667,22 @@ WARN("invalid parameter: pdidi->dwSize = %d\n", pdidi->dwSize); return DIERR_INVALIDPARAM; } + + /* Try to get joystick index */ + pd.diph.dwSize = sizeof(pd); + pd.diph.dwHeaderSize = sizeof(pd.diph); + pd.diph.dwObj = 0; + pd.diph.dwHow = DIPH_DEVICE; + if (SUCCEEDED(IDirectInputDevice2_GetProperty(iface, DIPROP_JOYSTICKID, &pd.diph))) + index = pd.dwData; /* Return joystick */ pdidi->guidInstance = This->guidInstance; pdidi->guidProduct = This->guidProduct; /* we only support traditional joysticks for now */ pdidi->dwDevType = This->devcaps.dwDevType; - MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, pdidi->tszInstanceName, MAX_PATH); + snprintf(buffer, sizeof(buffer), "Joystick %d", index); + MultiByteToWideChar(CP_ACP, 0, buffer, -1, pdidi->tszInstanceName, MAX_PATH); MultiByteToWideChar(CP_ACP, 0, This->name, -1, pdidi->tszProductName, MAX_PATH); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3W)) { pdidi->guidFFDriver = GUID_NULL; @@ -740,7 +764,7 @@ DWORD type = 0x000000ff & (lpdiaf->rgoAction[i].dwSemantic >> 8); DWORD genre = 0xff000000 & lpdiaf->rgoAction[i].dwSemantic; - /* Don't touch an user configured action */ + /* Don't touch a user configured action */ if (lpdiaf->rgoAction[i].dwHow == DIAH_USERCONFIG) continue; /* Only consider actions of the right genre */ @@ -750,7 +774,7 @@ { if (type & object_types[j]) { - /* Assure that the object exists */ + /* Ensure that the object exists */ LPDIOBJECTDATAFORMAT odf = dataformat_to_odf_by_type(This->base.data_format.wine_df, inst, object_types[j]); if (odf != NULL) Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linux.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -203,6 +203,52 @@ return joystick_devices_count; } +static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +{ + DWORD dwSize = lpddi->dwSize; + + TRACE("%d %p\n", dwSize, lpddi); + memset(lpddi, 0, dwSize); + + /* Return joystick */ + lpddi->dwSize = dwSize; + lpddi->guidInstance = DInput_Wine_Joystick_GUID; + lpddi->guidInstance.Data3 = id; + lpddi->guidProduct = DInput_Wine_Joystick_GUID; + /* we only support traditional joysticks for now */ + if (version >= 0x0800) + lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + strcpy(lpddi->tszInstanceName, joystick_devices[id].name); + strcpy(lpddi->tszProductName, joystick_devices[id].name); + + lpddi->guidFFDriver = GUID_NULL; +} + +static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +{ + DWORD dwSize = lpddi->dwSize; + + TRACE("%d %p\n", dwSize, lpddi); + memset(lpddi, 0, dwSize); + + /* Return joystick */ + lpddi->dwSize = dwSize; + lpddi->guidInstance = DInput_Wine_Joystick_GUID; + lpddi->guidInstance.Data3 = id; + lpddi->guidProduct = DInput_Wine_Joystick_GUID; + /* we only support traditional joysticks for now */ + if (version >= 0x0800) + lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + + MultiByteToWideChar(CP_ACP, 0, joystick_devices[id].name, -1, lpddi->tszInstanceName, MAX_PATH); + MultiByteToWideChar(CP_ACP, 0, joystick_devices[id].name, -1, lpddi->tszProductName, MAX_PATH); + lpddi->guidFFDriver = GUID_NULL; +} + static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { int fd = -1; @@ -223,21 +269,7 @@ WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].name, strerror(errno)); return S_FALSE; } - - /* Return joystick */ - lpddi->guidInstance = DInput_Wine_Joystick_GUID; - lpddi->guidInstance.Data3 = id; - lpddi->guidProduct = DInput_Wine_Joystick_GUID; - /* we only support traditional joysticks for now */ - if (version >= 0x0800) - lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); - - strcpy(lpddi->tszInstanceName, joystick_devices[id].name); - strcpy(lpddi->tszProductName, joystick_devices[id].name); - - lpddi->guidFFDriver = GUID_NULL; + fill_joystick_dideviceinstanceA( lpddi, version, id ); close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, lpddi->tszProductName); return S_OK; @@ -266,20 +298,7 @@ WARN("open(%s,O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); return S_FALSE; } - - /* Return joystick */ - lpddi->guidInstance = DInput_Wine_Joystick_GUID; - lpddi->guidInstance.Data3 = id; - lpddi->guidProduct = DInput_Wine_Joystick_GUID; - /* we only support traditional joysticks for now */ - if (version >= 0x0800) - lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); - - MultiByteToWideChar(CP_ACP, 0, joystick_devices[id].name, -1, lpddi->tszInstanceName, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, joystick_devices[id].name, -1, lpddi->tszProductName, MAX_PATH); - lpddi->guidFFDriver = GUID_NULL; + fill_joystick_dideviceinstanceW( lpddi, version, id ); close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, joystick_devices[id].name); return S_OK; @@ -568,6 +587,41 @@ { JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); return JoystickLinuxWImpl_GetProperty(IDirectInputDevice8W_from_impl(This), rguid, pdiph); +} + +/****************************************************************************** + * GetDeviceInfo : get information about a device's identity + */ +static HRESULT WINAPI JoystickLinuxAImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8A iface, LPDIDEVICEINSTANCEA ddi) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("(%p) %p\n", This, ddi); + + if (ddi == NULL) return E_POINTER; + if ((ddi->dwSize != sizeof(DIDEVICEINSTANCE_DX3A)) && + (ddi->dwSize != sizeof(DIDEVICEINSTANCEA))) + return DIERR_INVALIDPARAM; + + fill_joystick_dideviceinstanceA( ddi, This->generic.base.dinput->dwVersion, + get_joystick_index(&This->generic.base.guid) ); + return DI_OK; +} + +static HRESULT WINAPI JoystickLinuxWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW ddi) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + + TRACE("(%p) %p\n", This, ddi); + + if (ddi == NULL) return E_POINTER; + if ((ddi->dwSize != sizeof(DIDEVICEINSTANCE_DX3W)) && + (ddi->dwSize != sizeof(DIDEVICEINSTANCEW))) + return DIERR_INVALIDPARAM; + + fill_joystick_dideviceinstanceW( ddi, This->generic.base.dinput->dwVersion, + get_joystick_index(&This->generic.base.guid) ); + return DI_OK; } /****************************************************************************** @@ -693,7 +747,7 @@ IDirectInputDevice2AImpl_SetEventNotification, IDirectInputDevice2AImpl_SetCooperativeLevel, JoystickAGenericImpl_GetObjectInfo, - JoystickAGenericImpl_GetDeviceInfo, + JoystickLinuxAImpl_GetDeviceInfo, IDirectInputDevice2AImpl_RunControlPanel, IDirectInputDevice2AImpl_Initialize, IDirectInputDevice2AImpl_CreateEffect, @@ -729,7 +783,7 @@ IDirectInputDevice2WImpl_SetEventNotification, IDirectInputDevice2WImpl_SetCooperativeLevel, JoystickWGenericImpl_GetObjectInfo, - JoystickWGenericImpl_GetDeviceInfo, + JoystickLinuxWImpl_GetDeviceInfo, IDirectInputDevice2WImpl_RunControlPanel, IDirectInputDevice2WImpl_Initialize, IDirectInputDevice2WImpl_CreateEffect, Modified: trunk/reactos/dll/directx/wine/dinput/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/ke…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -515,6 +515,29 @@ return SysKeyboardWImpl_GetProperty(IDirectInputDevice8W_from_impl(This), rguid, pdiph); } +static HRESULT WINAPI SysKeyboardWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) +{ + SysKeyboardImpl *This = impl_from_IDirectInputDevice8W(iface); + HRESULT res; + + TRACE("(%p)\n", This); + + res = IDirectInputDevice2WImpl_Acquire(iface); + if (res == DI_OK) + { + TRACE("clearing keystate\n"); + memset(This->DInputKeyState, 0, sizeof(This->DInputKeyState)); + } + + return res; +} + +static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) +{ + SysKeyboardImpl *This = impl_from_IDirectInputDevice8A(iface); + return SysKeyboardWImpl_Acquire(IDirectInputDevice8W_from_impl(This)); +} + static HRESULT WINAPI SysKeyboardWImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, @@ -603,7 +626,7 @@ IDirectInputDevice2AImpl_EnumObjects, SysKeyboardAImpl_GetProperty, IDirectInputDevice2AImpl_SetProperty, - IDirectInputDevice2AImpl_Acquire, + SysKeyboardAImpl_Acquire, IDirectInputDevice2AImpl_Unacquire, SysKeyboardAImpl_GetDeviceState, IDirectInputDevice2AImpl_GetDeviceData, @@ -639,7 +662,7 @@ IDirectInputDevice2WImpl_EnumObjects, SysKeyboardWImpl_GetProperty, IDirectInputDevice2WImpl_SetProperty, - IDirectInputDevice2WImpl_Acquire, + SysKeyboardWImpl_Acquire, IDirectInputDevice2WImpl_Unacquire, SysKeyboardWImpl_GetDeviceState, IDirectInputDevice2WImpl_GetDeviceData, Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:22:55 2015 @@ -30,7 +30,7 @@ reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/devenum # Synced to WineStaging-1.7.47 -reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dplay # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68518: [DEVENUM] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:21:01 2015 New Revision: 68518 URL:
http://svn.reactos.org/svn/reactos?rev=68518&view=rev
Log: [DEVENUM] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/devenum/devenum_private.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/devenum/devenum_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/d…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/devenum_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/devenum_private.h [iso-8859-1] Tue Jul 21 23:21:01 2015 @@ -91,8 +91,8 @@ /********************************************************************** * Global string constant declarations */ -extern const WCHAR clsid_keyname[6]; -extern const WCHAR wszInstanceKeyName[]; +extern const WCHAR clsid_keyname[6] DECLSPEC_HIDDEN; +extern const WCHAR wszInstanceKeyName[] DECLSPEC_HIDDEN; #define CLSID_STR_LEN (sizeof(clsid_keyname) / sizeof(WCHAR)) #endif /* __WINE_DEVENUM_H */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:21:01 2015 @@ -29,7 +29,7 @@ reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.7.37 -reactos/dll/directx/wine/devenum # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/devenum # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68517: [D3DXOF] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:19:30 2015 New Revision: 68517 URL:
http://svn.reactos.org/svn/reactos?rev=68517&view=rev
Log: [D3DXOF] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c trunk/reactos/dll/directx/wine/d3dxof/main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/d3…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c [iso-8859-1] Tue Jul 21 23:19:30 2015 @@ -45,10 +45,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl; object->ref = 1; @@ -362,10 +359,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl; object->ref = 1; @@ -495,10 +489,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl; object->ref = 1; @@ -608,7 +599,7 @@ if (!pGuid) return DXFILEERR_BADVALUE; - memcpy(pGuid, &This->pobj->class_id, 16); + *pGuid = This->pobj->class_id; return DXFILE_OK; } @@ -656,7 +647,7 @@ if (!pguid) return DXFILEERR_BADVALUE; - memcpy(&guid, &This->pobj->type, 16); + guid = This->pobj->type; *pguid = &guid; return DXFILE_OK; @@ -773,10 +764,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl; object->ref = 1; @@ -875,7 +863,7 @@ if (!pGuid) return DXFILEERR_BADVALUE; - memcpy(pGuid, &This->ptarget->class_id, 16); + *pGuid = This->ptarget->class_id; return DXFILE_OK; } @@ -924,10 +912,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl; object->ref = 1; @@ -1026,7 +1011,6 @@ object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS); if (!object->pobj) { - ERR("Out of memory\n"); hr = DXFILEERR_BADALLOC; goto error; } @@ -1034,7 +1018,6 @@ object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER); if (!object->pstrings) { - ERR("Out of memory\n"); hr = DXFILEERR_BADALLOC; goto error; } @@ -1114,10 +1097,7 @@ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl; object->ref = 1; Modified: trunk/reactos/dll/directx/wine/d3dxof/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/ma…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/main.c [iso-8859-1] Tue Jul 21 23:19:30 2015 @@ -25,7 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); static HINSTANCE instance; -static LONG dll_ref = 0; /* For the moment, do nothing here. */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) @@ -209,7 +208,7 @@ */ HRESULT WINAPI DllCanUnloadNow(void) { - return dll_ref != 0 ? S_FALSE : S_OK; + return S_FALSE; } /*********************************************************************** Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:19:30 2015 @@ -27,7 +27,7 @@ reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3drm # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-1.7.37 -reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/devenum # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68516: [AMSTREAM_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:17:52 2015 New Revision: 68516 URL:
http://svn.reactos.org/svn/reactos?rev=68516&view=rev
Log: [AMSTREAM_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/amstream/amstream.c Modified: trunk/rostests/winetests/amstream/amstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/amstream/amstre…
============================================================================== --- trunk/rostests/winetests/amstream/amstream.c [iso-8859-1] (original) +++ trunk/rostests/winetests/amstream/amstream.c [iso-8859-1] Tue Jul 21 23:17:52 2015 @@ -33,21 +33,25 @@ #include <amstream.h> #include <dxsdk/uuids.h> +#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__) +static void _expect_ref(IUnknown* obj, ULONG ref, int line) +{ + ULONG rc = IUnknown_AddRef(obj); + IUnknown_Release(obj); + ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1); +} + static const WCHAR filenameW[] = {'t','e','s','t','.','a','v','i',0}; -static IAMMultiMediaStream* pams; static IDirectDraw7* pdd7; static IDirectDrawSurface7* pdds7; -static int create_ammultimediastream(void) -{ - return S_OK == CoCreateInstance( - &CLSID_AMMultiMediaStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMultiMediaStream, (LPVOID*)&pams); -} - -static void release_ammultimediastream(void) -{ - IAMMultiMediaStream_Release(pams); +static IAMMultiMediaStream *create_ammultimediastream(void) +{ + IAMMultiMediaStream *stream = NULL; + CoCreateInstance(&CLSID_AMMultiMediaStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMultiMediaStream, + (void**)&stream); + return stream; } static int create_directdraw(void) @@ -96,10 +100,11 @@ static void test_openfile(void) { + IAMMultiMediaStream *pams; HRESULT hr; IGraphBuilder* pgraph; - if (!create_ammultimediastream()) + if (!(pams = create_ammultimediastream())) return; hr = IAMMultiMediaStream_GetFilterGraph(pams, &pgraph); @@ -119,21 +124,24 @@ if (pgraph) IGraphBuilder_Release(pgraph); - release_ammultimediastream(); + IAMMultiMediaStream_Release(pams); } static void test_renderfile(void) { + IAMMultiMediaStream *pams; HRESULT hr; IMediaStream *pvidstream = NULL; IDirectDrawMediaStream *pddstream = NULL; IDirectDrawStreamSample *pddsample = NULL; - - if (!create_ammultimediastream()) + IDirectDrawSurface *surface; + RECT rect; + + if (!(pams = create_ammultimediastream())) return; if (!create_directdraw()) { - release_ammultimediastream(); + IAMMultiMediaStream_Release(pams); return; } @@ -160,31 +168,46 @@ hr = IDirectDrawMediaStream_CreateSample(pddstream, NULL, NULL, 0, &pddsample); ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); + surface = NULL; + hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface, &rect); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(surface == NULL, "got %p\n", surface); + IDirectDrawStreamSample_Release(pddsample); + + hr = IDirectDrawSurface7_QueryInterface(pdds7, &IID_IDirectDrawSurface, (void**)&surface); + ok(hr == S_OK, "got 0x%08x\n", hr); + + EXPECT_REF(surface, 1); + hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, NULL, 0, &pddsample); + ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); + EXPECT_REF(surface, 2); + IDirectDrawStreamSample_Release(pddsample); + IDirectDrawSurface_Release(surface); + error: - if (pddsample) - IDirectDrawStreamSample_Release(pddsample); if (pddstream) IDirectDrawMediaStream_Release(pddstream); if (pvidstream) IMediaStream_Release(pvidstream); release_directdraw(); - release_ammultimediastream(); + IAMMultiMediaStream_Release(pams); } static void test_media_streams(void) { + IAMMultiMediaStream *pams; HRESULT hr; IMediaStream *video_stream = NULL; IMediaStream *audio_stream = NULL; IMediaStream *dummy_stream; IMediaStreamFilter* media_stream_filter = NULL; - if (!create_ammultimediastream()) + if (!(pams = create_ammultimediastream())) return; if (!create_directdraw()) { - release_ammultimediastream(); + IAMMultiMediaStream_Release(pams); return; } @@ -431,7 +454,111 @@ IMediaStreamFilter_Release(media_stream_filter); release_directdraw(); - release_ammultimediastream(); + IAMMultiMediaStream_Release(pams); +} + +static void test_IDirectDrawStreamSample(void) +{ + DDSURFACEDESC desc = { sizeof(desc) }; + IAMMultiMediaStream *pams; + HRESULT hr; + IMediaStream *pvidstream = NULL; + IDirectDrawMediaStream *pddstream = NULL; + IDirectDrawStreamSample *pddsample = NULL; + IDirectDrawSurface7 *surface7; + IDirectDrawSurface *surface, *surface2; + IDirectDraw *ddraw, *ddraw2; + IDirectDraw7 *ddraw7; + RECT rect; + + if (!(pams = create_ammultimediastream())) + return; + if (!create_directdraw()) + { + IAMMultiMediaStream_Release(pams); + return; + } + + hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IAMMultiMediaStream_AddMediaStream(pams, (IUnknown*)pdd7, &MSPID_PrimaryVideo, 0, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryVideo, &pvidstream); + ok(hr == S_OK, "got 0x%08x\n", hr); + if (FAILED(hr)) goto error; + + hr = IMediaStream_QueryInterface(pvidstream, &IID_IDirectDrawMediaStream, (LPVOID*)&pddstream); + ok(hr == S_OK, "got 0x%08x\n", hr); + if (FAILED(hr)) goto error; + + hr = IDirectDrawMediaStream_GetDirectDraw(pddstream, &ddraw); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDirectDrawMediaStream_GetDirectDraw(pddstream, &ddraw2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(ddraw == ddraw2, "got %p, %p\n", ddraw, ddraw2); + + hr = IDirectDraw_QueryInterface(ddraw, &IID_IDirectDraw7, (void**)&ddraw7); + ok(hr == S_OK, "got 0x%08x\n", hr); + IDirectDraw7_Release(ddraw7); + + IDirectDraw_Release(ddraw2); + IDirectDraw_Release(ddraw); + + hr = IDirectDrawMediaStream_CreateSample(pddstream, NULL, NULL, 0, &pddsample); + ok(hr == S_OK, "got 0x%08x\n", hr); + + surface = NULL; + hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface, &rect); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(surface != NULL, "got %p\n", surface); + + hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void**)&surface7); + ok(hr == S_OK, "got 0x%08x\n", hr); + IDirectDrawSurface7_Release(surface7); + + hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(desc.dwWidth == 100, "width %d\n", desc.dwWidth); + ok(desc.dwHeight == 100, "height %d\n", desc.dwHeight); + ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "format flags %08x\n", desc.ddpfPixelFormat.dwFlags); + ok(desc.ddpfPixelFormat.dwRGBBitCount, "dwRGBBitCount %d\n", desc.ddpfPixelFormat.dwRGBBitCount); + IDirectDrawSurface_Release(surface); + IDirectDrawStreamSample_Release(pddsample); + + hr = IDirectDrawSurface7_QueryInterface(pdds7, &IID_IDirectDrawSurface, (void**)&surface); + ok(hr == S_OK, "got 0x%08x\n", hr); + + EXPECT_REF(surface, 1); + hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, NULL, 0, &pddsample); + ok(hr == S_OK, "got 0x%08x\n", hr); + EXPECT_REF(surface, 2); + + surface2 = NULL; + memset(&rect, 0, sizeof(rect)); + hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface2, &rect); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(surface == surface2, "got %p\n", surface2); + ok(rect.right > 0 && rect.bottom > 0, "got %d, %d\n", rect.right, rect.bottom); + EXPECT_REF(surface, 3); + IDirectDrawSurface_Release(surface2); + + hr = IDirectDrawStreamSample_GetSurface(pddsample, NULL, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + IDirectDrawStreamSample_Release(pddsample); + IDirectDrawSurface_Release(surface); + +error: + if (pddstream) + IDirectDrawMediaStream_Release(pddstream); + if (pvidstream) + IMediaStream_Release(pvidstream); + + release_directdraw(); + IAMMultiMediaStream_Release(pams); } START_TEST(amstream) @@ -441,6 +568,7 @@ CoInitializeEx(NULL, COINIT_MULTITHREADED); test_media_streams(); + test_IDirectDrawStreamSample(); file = CreateFileW(filenameW, 0, 0, NULL, OPEN_EXISTING, 0, NULL); if (file != INVALID_HANDLE_VALUE)
9 years, 5 months
1
0
0
0
[akhaldi] 68515: [AMSTREAM] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Jul 21 23:17:39 2015 New Revision: 68515 URL:
http://svn.reactos.org/svn/reactos?rev=68515&view=rev
Log: [AMSTREAM] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt trunk/reactos/dll/directx/wine/amstream/amstream.c trunk/reactos/dll/directx/wine/amstream/amstream_private.h trunk/reactos/dll/directx/wine/amstream/main.c trunk/reactos/dll/directx/wine/amstream/mediastream.c trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/CMakeLists.txt [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -21,6 +21,6 @@ set_module_type(amstream win32dll) target_link_libraries(amstream strmbase strmiids uuid wine) -add_importlibs(amstream ole32 msvcrt kernel32 ntdll) +add_importlibs(amstream ole32 ddraw msvcrt kernel32 ntdll) add_pch(amstream amstream_private.h SOURCE) add_cd_file(TARGET amstream DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/directx/wine/amstream/amstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/amstream.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/amstream.c [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -27,10 +27,10 @@ IGraphBuilder* pFilterGraph; IMediaSeeking* media_seeking; IMediaControl* media_control; - IBaseFilter* media_stream_filter; + IMediaStreamFilter *media_stream_filter; IPin* ipin; ULONG nbStreams; - IMediaStream** pStreams; + IAMMediaStream **pStreams; STREAM_TYPE StreamType; OAEVENT event; } IAMMultiMediaStreamImpl; @@ -104,11 +104,12 @@ if (!ref) { for(i = 0; i < This->nbStreams; i++) - IMediaStream_Release(This->pStreams[i]); + IAMMediaStream_Release(This->pStreams[i]); + CoTaskMemFree(This->pStreams); if (This->ipin) IPin_Release(This->ipin); if (This->media_stream_filter) - IBaseFilter_Release(This->media_stream_filter); + IMediaStreamFilter_Release(This->media_stream_filter); if (This->media_seeking) IMediaSeeking_Release(This->media_seeking); if (This->media_control) @@ -141,10 +142,10 @@ for (i = 0; i < This->nbStreams; i++) { - IMediaStream_GetInformation(This->pStreams[i], &PurposeId, NULL); + IAMMediaStream_GetInformation(This->pStreams[i], &PurposeId, NULL); if (IsEqualIID(&PurposeId, idPurpose)) { - *ppMediaStream = This->pStreams[i]; + *ppMediaStream = (IMediaStream*)This->pStreams[i]; IMediaStream_AddRef(*ppMediaStream); return S_OK; } @@ -246,11 +247,11 @@ This->StreamType = StreamType; hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking, (void**)&This->media_seeking); if (SUCCEEDED(hr)) - IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control); + hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control); if (SUCCEEDED(hr)) - hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter); + hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void**)&This->media_stream_filter); if (SUCCEEDED(hr)) - IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW); + hr = IGraphBuilder_AddFilter(This->pFilterGraph, (IBaseFilter*)This->media_stream_filter, filternameW); if (SUCCEEDED(hr)) { IMediaEventEx* media_event = NULL; @@ -267,7 +268,7 @@ if (FAILED(hr)) { if (This->media_stream_filter) - IBaseFilter_Release(This->media_stream_filter); + IMediaStreamFilter_Release(This->media_stream_filter); This->media_stream_filter = NULL; if (This->media_seeking) IMediaSeeking_Release(This->media_seeking); @@ -303,19 +304,17 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface, IMediaStreamFilter** ppFilter) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); - HRESULT hr = S_OK; TRACE("(%p/%p)->(%p)\n", This, iface, ppFilter); if (!ppFilter) return E_POINTER; - *ppFilter = NULL; - - if (This->media_stream_filter) - hr = IBaseFilter_QueryInterface(This->media_stream_filter, &IID_IMediaStreamFilter, (LPVOID*)ppFilter); - - return hr; + *ppFilter = This->media_stream_filter; + if (*ppFilter) + IMediaStreamFilter_AddRef(*ppFilter); + + return S_OK; } static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* stream_object, const MSPID* PurposeId, @@ -323,8 +322,8 @@ { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT hr; - IMediaStream* pStream; - IMediaStream** pNewStreams; + IAMMediaStream* pStream; + IAMMediaStream** pNewStreams; TRACE("(%p/%p)->(%p,%s,%x,%p)\n", This, iface, stream_object, debugstr_guid(PurposeId), dwFlags, ppNewStream); @@ -364,10 +363,10 @@ hr = audiomediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream); if (SUCCEEDED(hr)) { - pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IMediaStream*)); + pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IAMMediaStream*)); if (!pNewStreams) { - IMediaStream_Release(pStream); + IAMMediaStream_Release(pStream); return E_OUTOFMEMORY; } This->pStreams = pNewStreams; @@ -375,13 +374,13 @@ This->nbStreams++; if (ppNewStream) - *ppNewStream = pStream; + *ppNewStream = (IMediaStream*)pStream; } if (SUCCEEDED(hr)) { /* Add stream to the media stream filter */ - IMediaStreamFilter_AddMediaStream((IMediaStreamFilter*)This->media_stream_filter, (IAMMediaStream*)pStream); + IMediaStreamFilter_AddMediaStream(This->media_stream_filter, pStream); } return hr; Modified: trunk/reactos/dll/directx/wine/amstream/amstream_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/amstream_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/amstream_private.h [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -35,8 +35,8 @@ HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, - STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN; + STREAM_TYPE StreamType, IAMMediaStream **ppMediaStream) DECLSPEC_HIDDEN; HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, - STREAM_TYPE stream_type, IMediaStream **media_stream) DECLSPEC_HIDDEN; + STREAM_TYPE stream_type, IAMMediaStream **media_stream) DECLSPEC_HIDDEN; #endif /* __AMSTREAM_PRIVATE_INCLUDED__ */ Modified: trunk/reactos/dll/directx/wine/amstream/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/main.c [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -23,7 +23,6 @@ #include <rpcproxy.h> static HINSTANCE instance; -static DWORD dll_ref = 0; /* For the moment, do nothing here. */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) @@ -189,7 +188,7 @@ */ HRESULT WINAPI DllCanUnloadNow(void) { - return dll_ref != 0 ? S_FALSE : S_OK; + return S_FALSE; } /*********************************************************************** Modified: trunk/reactos/dll/directx/wine/amstream/mediastream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/mediastream.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/mediastream.c [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -20,7 +20,11 @@ #include "amstream_private.h" -static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawStreamSample **ddraw_stream_sample); +#include <initguid.h> +DEFINE_GUID(IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b); + +static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawSurface *surface, + const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample); static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *audio_data, IAudioStreamSample **audio_stream_sample); typedef struct { @@ -30,6 +34,7 @@ IMultiMediaStream* parent; MSPID purpose_id; STREAM_TYPE stream_type; + IDirectDraw7 *ddraw; } DirectDrawMediaStreamImpl; static inline DirectDrawMediaStreamImpl *impl_from_DirectDrawMediaStream_IAMMediaStream(IAMMediaStream *iface) @@ -82,7 +87,11 @@ TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); if (!ref) + { + if (This->ddraw) + IDirectDraw7_Release(This->ddraw); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -230,48 +239,22 @@ REFIID riid, void **ret_iface) { DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IMediaStream) || - IsEqualGUID(riid, &IID_IDirectDrawMediaStream)) - { - IDirectDrawMediaStream_AddRef(iface); - *ret_iface = iface; - return S_OK; - } - else if (IsEqualGUID(riid, &IID_IAMMediaStream)) - { - IDirectDrawMediaStream_AddRef(iface); - *ret_iface = &This->IAMMediaStream_iface; - return S_OK; - } - - ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface); - return E_NOINTERFACE; + return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid, ret_iface); } static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AddRef(IDirectDrawMediaStream *iface) { DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - TRACE("(%p/%p)\n", iface, This); - - return InterlockedIncrement(&This->ref); + return IAMMediaStream_AddRef(&This->IAMMediaStream_iface); } static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Release(IDirectDrawMediaStream *iface) { DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p/%p)\n", iface, This); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; + return IAMMediaStream_Release(&This->IAMMediaStream_iface); } /*** IMediaStream methods ***/ @@ -361,11 +344,22 @@ } static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw(IDirectDrawMediaStream *iface, - IDirectDraw **ppDirectDraw) -{ - FIXME("(%p)->(%p) stub!\n", iface, ppDirectDraw); - - return E_NOTIMPL; + IDirectDraw **ddraw) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + TRACE("(%p)->(%p)\n", iface, ddraw); + + *ddraw = NULL; + if (!This->ddraw) + { + HRESULT hr = DirectDrawCreateEx(NULL, (void**)&This->ddraw, &IID_IDirectDraw7, NULL); + if (FAILED(hr)) + return hr; + IDirectDraw7_SetCooperativeLevel(This->ddraw, NULL, DDSCL_NORMAL); + } + + return IDirectDraw7_QueryInterface(This->ddraw, &IID_IDirectDraw, (void**)ddraw); } static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw(IDirectDrawMediaStream *iface, @@ -377,12 +371,12 @@ } static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSample(IDirectDrawMediaStream *iface, - IDirectDrawSurface *pSurface, const RECT *pRect, DWORD dwFlags, + IDirectDrawSurface *surface, const RECT *rect, DWORD dwFlags, IDirectDrawStreamSample **ppSample) { - TRACE("(%p)->(%p,%p,%x,%p)\n", iface, pSurface, pRect, dwFlags, ppSample); - - return ddrawstreamsample_create(iface, ppSample); + TRACE("(%p)->(%p,%s,%x,%p)\n", iface, surface, wine_dbgstr_rect(rect), dwFlags, ppSample); + + return ddrawstreamsample_create(iface, surface, rect, ppSample); } static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame(IDirectDrawMediaStream *iface, @@ -416,7 +410,7 @@ }; HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, - STREAM_TYPE stream_type, IMediaStream **media_stream) + STREAM_TYPE stream_type, IAMMediaStream **media_stream) { DirectDrawMediaStreamImpl *object; @@ -434,7 +428,7 @@ object->purpose_id = *purpose_id; object->stream_type = stream_type; - *media_stream = (IMediaStream*)&object->IAMMediaStream_iface; + *media_stream = &object->IAMMediaStream_iface; return S_OK; } @@ -646,52 +640,22 @@ REFIID riid, void **ret_iface) { AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); - TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IMediaStream) || - IsEqualGUID(riid, &IID_IAudioMediaStream)) - { - IAudioMediaStream_AddRef(iface); - *ret_iface = iface; - return S_OK; - } - else if (IsEqualGUID(riid, &IID_IAMMediaStream)) - { - IAudioMediaStream_AddRef(iface); - *ret_iface = &This->IAMMediaStream_iface; - return S_OK; - } - - - *ret_iface = NULL; - - ERR("(%p/%p)->(%s,%p),not found\n", iface, This, debugstr_guid(riid), ret_iface); - return E_NOINTERFACE; + return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid, ret_iface); } static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_AddRef(IAudioMediaStream *iface) { AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); - ULONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p/%p): new ref = %u\n", iface, This, ref); - - return ref; + TRACE("(%p/%p)\n", iface, This); + return IAMMediaStream_AddRef(&This->IAMMediaStream_iface); } static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_Release(IAudioMediaStream *iface) { AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p/%p): new ref = %u\n", iface, This, ref); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; + TRACE("(%p/%p)\n", iface, This); + return IAMMediaStream_Release(&This->IAMMediaStream_iface); } /*** IMediaStream methods ***/ @@ -816,7 +780,7 @@ }; HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, - STREAM_TYPE stream_type, IMediaStream **media_stream) + STREAM_TYPE stream_type, IAMMediaStream **media_stream) { AudioMediaStreamImpl *object; @@ -834,7 +798,7 @@ object->purpose_id = *purpose_id; object->stream_type = stream_type; - *media_stream = (IMediaStream*)&object->IAMMediaStream_iface; + *media_stream = &object->IAMMediaStream_iface; return S_OK; } @@ -843,6 +807,8 @@ IDirectDrawStreamSample IDirectDrawStreamSample_iface; LONG ref; IMediaStream *parent; + IDirectDrawSurface *surface; + RECT rect; } IDirectDrawStreamSampleImpl; static inline IDirectDrawStreamSampleImpl *impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface) @@ -889,7 +855,12 @@ TRACE("(%p)->(): new ref = %u\n", iface, ref); if (!ref) + { + if (This->surface) + IDirectDrawSurface_Release(This->surface); + IMediaStream_Release(This->parent); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -937,9 +908,21 @@ static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSurface(IDirectDrawStreamSample *iface, IDirectDrawSurface **ddraw_surface, RECT *rect) { - FIXME("(%p)->(%p,%p): stub\n", iface, ddraw_surface, rect); - - return E_NOTIMPL; + IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface); + + TRACE("(%p)->(%p,%p)\n", iface, ddraw_surface, rect); + + if (ddraw_surface) + { + *ddraw_surface = This->surface; + if (*ddraw_surface) + IDirectDrawSurface_AddRef(*ddraw_surface); + } + + if (rect) + *rect = This->rect; + + return S_OK; } static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetRect(IDirectDrawStreamSample *iface, const RECT *rect) @@ -966,21 +949,78 @@ IDirectDrawStreamSampleImpl_SetRect }; -static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawStreamSample **ddraw_stream_sample) +static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawSurface *surface, + const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample) { IDirectDrawStreamSampleImpl *object; + HRESULT hr; TRACE("(%p)\n", ddraw_stream_sample); - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawStreamSampleImpl)); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) return E_OUTOFMEMORY; object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl; object->ref = 1; object->parent = (IMediaStream*)parent; - - *ddraw_stream_sample = (IDirectDrawStreamSample*)&object->IDirectDrawStreamSample_iface; + IMediaStream_AddRef(object->parent); + + if (surface) + { + object->surface = surface; + IDirectDrawSurface_AddRef(surface); + } + else + { + DDSURFACEDESC desc; + IDirectDraw *ddraw; + + hr = IDirectDrawMediaStream_GetDirectDraw(parent, &ddraw); + if (FAILED(hr)) + { + IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface); + return hr; + } + + desc.dwSize = sizeof(desc); + desc.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT; + desc.dwHeight = 100; + desc.dwWidth = 100; + desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); + desc.ddpfPixelFormat.dwFlags = DDPF_RGB; + desc.ddpfPixelFormat.dwRGBBitCount = 32; + desc.ddpfPixelFormat.dwRBitMask = 0xff0000; + desc.ddpfPixelFormat.dwGBitMask = 0x00ff00; + desc.ddpfPixelFormat.dwBBitMask = 0x0000ff; + desc.ddpfPixelFormat.dwRGBAlphaBitMask = 0; + desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; + + hr = IDirectDraw_CreateSurface(ddraw, &desc, &object->surface, NULL); + IDirectDraw_Release(ddraw); + if (FAILED(hr)) + { + ERR("failed to create surface, 0x%08x\n", hr); + IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface); + return hr; + } + } + + if (rect) + object->rect = *rect; + else if (object->surface) + { + DDSURFACEDESC desc = { sizeof(desc) }; + hr = IDirectDrawSurface_GetSurfaceDesc(object->surface, &desc); + if (hr == S_OK) + { + object->rect.left = object->rect.top = 0; + object->rect.right = desc.dwWidth; + object->rect.bottom = desc.dwHeight; + } + } + + *ddraw_stream_sample = &object->IDirectDrawStreamSample_iface; return S_OK; } Modified: trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/amstream/…
============================================================================== --- trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/amstream/mediastreamfilter.c [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -237,6 +237,8 @@ IMediaStream_Release(This->streams[i]); IPin_Release(This->pins[i]); } + CoTaskMemFree(This->streams); + CoTaskMemFree(This->pins); BaseFilter_Destroy(&This->filter); HeapFree(GetProcessHeap(), 0, This); } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jul 21 23:17:39 2015 @@ -21,7 +21,7 @@ The following libraries are shared with Wine. -reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.37 +reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.47 reactos/dll/directx/wine/d3d8 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3d9 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
26
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
Results per page:
10
25
50
100
200