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
November 2016
----- 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
15 participants
317 discussions
Start a n
N
ew thread
[akhaldi] 73260: [MBEDTLS] Export some needed functions for bcrypt. By Peter Hater.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:09:11 2016 New Revision: 73260 URL:
http://svn.reactos.org/svn/reactos?rev=73260&view=rev
Log: [MBEDTLS] Export some needed functions for bcrypt. By Peter Hater. Modified: trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec Modified: trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mbedtls/mbedt…
============================================================================== --- trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec [iso-8859-1] Thu Nov 17 22:09:11 2016 @@ -31,6 +31,17 @@ @ cdecl mbedtls_md_info_from_type(long) @ cdecl mbedtls_pk_get_bitlen(ptr) @ cdecl mbedtls_ctr_drbg_seed(ptr ptr ptr str long) +@ cdecl mbedtls_md_init(ptr) +@ cdecl mbedtls_md_setup(ptr ptr long) +@ cdecl mbedtls_md_update(ptr ptr long) +@ cdecl mbedtls_md_hmac_starts(ptr) +@ cdecl mbedtls_md_hmac_finish(ptr ptr) +@ cdecl mbedtls_md_free(ptr) +@ cdecl mbedtls_md5_init(ptr) +@ cdecl mbedtls_md5_starts(ptr) +@ cdecl mbedtls_md5_update(ptr ptr long) +@ cdecl mbedtls_md5_finish(ptr ptr) +@ cdecl mbedtls_md5_free(ptr) @ cdecl mbedtls_sha1_init(ptr) @ cdecl mbedtls_sha1_starts(ptr) @ cdecl mbedtls_sha1_update(ptr ptr long)
8 years, 1 month
1
0
0
0
[akhaldi] 73259: [PSDK] Update bcrypt.h. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:07:42 2016 New Revision: 73259 URL:
http://svn.reactos.org/svn/reactos?rev=73259&view=rev
Log: [PSDK] Update bcrypt.h. CORE-12409 Modified: trunk/reactos/sdk/include/psdk/bcrypt.h Modified: trunk/reactos/sdk/include/psdk/bcrypt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/bcrypt.h?…
============================================================================== --- trunk/reactos/sdk/include/psdk/bcrypt.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/bcrypt.h [iso-8859-1] Thu Nov 17 22:07:42 2016 @@ -61,6 +61,8 @@ #define MS_PRIMITIVE_PROVIDER L"Microsoft Primitive Provider" #define MS_PLATFORM_CRYPTO_PROVIDER L"Microsoft Platform Crypto Provider" +#define BCRYPT_MD5_ALGORITHM L"MD5" +#define BCRYPT_RNG_ALGORITHM L"RNG" #define BCRYPT_SHA1_ALGORITHM L"SHA1" #define BCRYPT_SHA256_ALGORITHM L"SHA256" #define BCRYPT_SHA384_ALGORITHM L"SHA384" @@ -79,6 +81,7 @@ #define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001 #define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 +#define BCRYPT_ALG_HANDLE_HMAC_FLAG 0x00000008 NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE, ULONG); NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG); @@ -88,6 +91,7 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG); NTSTATUS WINAPI BCryptGetFipsAlgorithmMode(BOOLEAN *); NTSTATUS WINAPI BCryptGetProperty(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG); +NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, PUCHAR, ULONG); NTSTATUS WINAPI BCryptHashData(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG); NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
8 years, 1 month
1
0
0
0
[akhaldi] 73258: [AVIFIL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:06:10 2016 New Revision: 73258 URL:
http://svn.reactos.org/svn/reactos?rev=73258&view=rev
Log: [AVIFIL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/avifil32/api.c Modified: trunk/rostests/winetests/avifil32/api.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/avifil32/api.c?…
============================================================================== --- trunk/rostests/winetests/avifil32/api.c [iso-8859-1] (original) +++ trunk/rostests/winetests/avifil32/api.c [iso-8859-1] Thu Nov 17 22:06:10 2016 @@ -377,6 +377,11 @@ res = AVIFileOpenA(&pFile, filename, OF_SHARE_DENY_WRITE, 0L); ok(res == 0, "Unable to open file: error=%u\n", res); + pStream0 = (void *)0xdeadbeef; + res = AVIFileGetStream(pFile, &pStream0, ~0, 0); + ok(res == AVIERR_NODATA, "expected AVIERR_NODATA, got %#x\n", res); + ok(pStream0 == NULL, "AVIFileGetStream should set stream to NULL\n"); + res = AVIFileGetStream(pFile, &pStream0, 0, 0); ok(res == 0, "Unable to open video stream: error=%u\n", res);
8 years, 1 month
1
0
0
0
[akhaldi] 73257: [AVIFIL32] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:05:29 2016 New Revision: 73257 URL:
http://svn.reactos.org/svn/reactos?rev=73257&view=rev
Log: [AVIFIL32] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/avifil32/avifile.c trunk/reactos/dll/win32/avifil32/getframe.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/avifil32/avifile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/avifil32/avifile…
============================================================================== --- trunk/reactos/dll/win32/avifil32/avifile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/avifil32/avifile.c [iso-8859-1] Thu Nov 17 22:05:29 2016 @@ -297,6 +297,7 @@ } /* Sorry, but the specified stream doesn't exist */ + *avis = NULL; return AVIERR_NODATA; } Modified: trunk/reactos/dll/win32/avifil32/getframe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/avifil32/getfram…
============================================================================== --- trunk/reactos/dll/win32/avifil32/getframe.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/avifil32/getframe.c [iso-8859-1] Thu Nov 17 22:05:29 2016 @@ -490,7 +490,7 @@ IAVIStream_AddRef(pStream); } - return (PGETFRAME)pg; + return &pg->IGetFrame_iface; } /***********************************************************************/ 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] Thu Nov 17 22:05:29 2016 @@ -48,7 +48,7 @@ reactos/dll/win32/atl # Synced to WineStaging-1.9.16 reactos/dll/win32/atl80 # Synced to WineStaging-1.9.11 reactos/dll/win32/atl100 # Synced to WineStaging-1.9.11 -reactos/dll/win32/avifil32 # Synced to WineStaging-1.9.16 +reactos/dll/win32/avifil32 # Synced to WineStaging-1.9.23 reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.4 reactos/dll/win32/browseui # Out of sync reactos/dll/win32/cabinet # Synced to WineStaging-1.9.16
8 years, 1 month
1
0
0
0
[akhaldi] 73256: [QUARTZ] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:03:51 2016 New Revision: 73256 URL:
http://svn.reactos.org/svn/reactos?rev=73256&view=rev
Log: [QUARTZ] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/directx/wine/quartz/avisplit.c trunk/reactos/dll/directx/wine/quartz/dsoundrender.c trunk/reactos/dll/directx/wine/quartz/filesource.c trunk/reactos/dll/directx/wine/quartz/filtergraph.c trunk/reactos/dll/directx/wine/quartz/filtermapper.c trunk/reactos/dll/directx/wine/quartz/main.c trunk/reactos/dll/directx/wine/quartz/mpegsplit.c trunk/reactos/dll/directx/wine/quartz/parser.c trunk/reactos/dll/directx/wine/quartz/videorenderer.c trunk/reactos/dll/directx/wine/quartz/vmr9.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/quartz/avisplit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/av…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/avisplit.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/avisplit.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -673,7 +673,7 @@ ZeroMemory(&amt, sizeof(amt)); piOutput.dir = PINDIR_OUTPUT; - piOutput.pFilter = (IBaseFilter *)This; + piOutput.pFilter = &This->Parser.filter.IBaseFilter_iface; wsprintfW(piOutput.achName, wszStreamTemplate, This->Parser.cStreams); This->streams = CoTaskMemRealloc(This->streams, sizeof(StreamData) * (This->Parser.cStreams+1)); stream = This->streams + This->Parser.cStreams; Modified: trunk/reactos/dll/directx/wine/quartz/dsoundrender.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/ds…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/dsoundrender.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/dsoundrender.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -649,7 +649,7 @@ if (!pDSoundRender->blocked || FAILED(hr)) { - IUnknown_Release((IUnknown *)pDSoundRender); + IBaseFilter_Release(&pDSoundRender->renderer.filter.IBaseFilter_iface); return HRESULT_FROM_WIN32(GetLastError()); } @@ -788,7 +788,7 @@ LPVOID*ppvObj) { DSoundRenderImpl *This = impl_from_IBasicAudio(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); } @@ -982,7 +982,7 @@ { DSoundRenderImpl *This = impl_from_IReferenceClock(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); } @@ -1150,7 +1150,7 @@ { DSoundRenderImpl *This = impl_from_IAMDirectSound(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return DSoundRender_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); } @@ -1263,17 +1263,17 @@ static HRESULT WINAPI AMFilterMiscFlags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv) { DSoundRenderImpl *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); + return IBaseFilter_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv); } static ULONG WINAPI AMFilterMiscFlags_AddRef(IAMFilterMiscFlags *iface) { DSoundRenderImpl *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_AddRef((IUnknown*)This); + return IBaseFilter_AddRef(&This->renderer.filter.IBaseFilter_iface); } static ULONG WINAPI AMFilterMiscFlags_Release(IAMFilterMiscFlags *iface) { DSoundRenderImpl *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_Release((IUnknown*)This); + return IBaseFilter_Release(&This->renderer.filter.IBaseFilter_iface); } static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags(IAMFilterMiscFlags *iface) { Modified: trunk/reactos/dll/directx/wine/quartz/filesource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/filesource.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/filesource.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -1419,17 +1419,17 @@ static HRESULT WINAPI AMFilterMiscFlags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv) { AsyncReader *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); + return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv); } static ULONG WINAPI AMFilterMiscFlags_AddRef(IAMFilterMiscFlags *iface) { AsyncReader *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_AddRef((IUnknown*)This); + return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface); } static ULONG WINAPI AMFilterMiscFlags_Release(IAMFilterMiscFlags *iface) { AsyncReader *This = impl_from_IAMFilterMiscFlags(iface); - return IUnknown_Release((IUnknown*)This); + return IBaseFilter_Release(&This->filter.IBaseFilter_iface); } static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags(IAMFilterMiscFlags *iface) { Modified: trunk/reactos/dll/directx/wine/quartz/filtergraph.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/filtergraph.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/filtergraph.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -192,7 +192,7 @@ static HRESULT WINAPI FilterGraphInner_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObj) { IFilterGraphImpl *This = impl_from_IUnknown(iface); - TRACE("(%p)->(%s (%p), %p)\n", This, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj); if (IsEqualGUID(&IID_IUnknown, riid)) { *ppvObj = &This->IUnknown_inner; @@ -320,7 +320,7 @@ { IFilterGraphImpl *This = impl_from_IFilterGraph2(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -668,14 +668,14 @@ if (FAILED(hr)) return hr; - TRACE("Filter owning first pin => %p\n", PinInfo.pFilter); + TRACE("Filter owning ppinIn(%p) => %p\n", ppinIn, PinInfo.pFilter); IBaseFilter_Release(PinInfo.pFilter); hr = IPin_QueryPinInfo(ppinOut, &PinInfo); if (FAILED(hr)) return hr; - TRACE("Filter owning second pin => %p\n", PinInfo.pFilter); + TRACE("Filter owning ppinOut(%p) => %p\n", ppinOut, PinInfo.pFilter); IBaseFilter_Release(PinInfo.pFilter); } @@ -897,14 +897,14 @@ if (FAILED(hr)) return hr; - TRACE("Filter owning first pin => %p\n", PinInfo.pFilter); + TRACE("Filter owning ppinIn(%p) => %p\n", ppinIn, PinInfo.pFilter); IBaseFilter_Release(PinInfo.pFilter); hr = IPin_QueryPinInfo(ppinOut, &PinInfo); if (FAILED(hr)) return hr; - TRACE("Filter owning second pin => %p\n", PinInfo.pFilter); + TRACE("Filter owning ppinOut(%p) => %p\n", ppinOut, PinInfo.pFilter); IBaseFilter_Release(PinInfo.pFilter); } @@ -924,6 +924,8 @@ if (dir == PINDIR_INPUT) { IPin *temp; + + TRACE("Directions seem backwards, swapping pins\n"); temp = ppinIn; ppinIn = ppinOut; @@ -1819,7 +1821,7 @@ { IFilterGraphImpl *This = impl_from_IMediaControl(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -1868,7 +1870,8 @@ { IFilterGraphImpl *This = impl_from_IMediaControl(iface); - TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); + TRACE("(%p/%p)->(%s, %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), rgszNames, + cNames, lcid, rgDispId); return S_OK; } @@ -1879,7 +1882,8 @@ { IFilterGraphImpl *This = impl_from_IMediaControl(iface); - TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); + TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); return S_OK; } @@ -2215,7 +2219,7 @@ { IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -2663,7 +2667,7 @@ { IFilterGraphImpl *This = impl_from_IMediaPosition( iface ); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -2875,7 +2879,7 @@ { IFilterGraphImpl *This = impl_from_IObjectWithSite( iface ); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -2987,7 +2991,7 @@ { IFilterGraphImpl *This = impl_from_IBasicAudio(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -3059,7 +3063,8 @@ IBasicAudio* pBasicAudio; HRESULT hr; - TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); + TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); EnterCriticalSection(&This->cs); @@ -3081,7 +3086,8 @@ IBasicAudio* pBasicAudio; HRESULT hr; - TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); + TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); EnterCriticalSection(&This->cs); @@ -3200,7 +3206,7 @@ { IFilterGraphImpl *This = impl_from_IBasicVideo2(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -3272,7 +3278,8 @@ IBasicVideo *pBasicVideo; HRESULT hr; - TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); + TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); EnterCriticalSection(&This->cs); @@ -3294,7 +3301,8 @@ IBasicVideo *pBasicVideo; HRESULT hr; - TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); + TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); EnterCriticalSection(&This->cs); @@ -4030,7 +4038,7 @@ { IFilterGraphImpl *This = impl_from_IVideoWindow(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -4102,7 +4110,8 @@ IVideoWindow *pVideoWindow; HRESULT hr; - TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); + TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); EnterCriticalSection(&This->cs); @@ -4124,7 +4133,8 @@ IVideoWindow *pVideoWindow; HRESULT hr; - TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); + TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); EnterCriticalSection(&This->cs); @@ -4987,7 +4997,7 @@ { IFilterGraphImpl *This = impl_from_IMediaEventEx(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -5035,7 +5045,8 @@ { IFilterGraphImpl *This = impl_from_IMediaEventEx(iface); - TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId); + TRACE("(%p/%p)->(%s, %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), rgszNames, + cNames, lcid, rgDispId); return S_OK; } @@ -5046,7 +5057,8 @@ { IFilterGraphImpl *This = impl_from_IMediaEventEx(iface); - TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); + TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); return S_OK; } Modified: trunk/reactos/dll/directx/wine/quartz/filtermapper.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/fi…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/filtermapper.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/filtermapper.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -1139,7 +1139,7 @@ REGFILTER* regfilters; HRESULT hr; - TRACE("(%p/%p)->(%p, %x, %s, %s, %s, %s, %s, %s, %s) stub!\n", + TRACE("(%p/%p)->(%p, %x, %s, %s, %s, %s, %s, %s, %s)\n", This, iface, ppEnum, Modified: trunk/reactos/dll/directx/wine/quartz/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/ma…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/main.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -22,6 +22,8 @@ extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN; extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN; extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN; + +static LONG server_locks = 0; /* For the moment, do nothing here. */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) @@ -136,6 +138,10 @@ { IClassFactoryImpl *This = impl_from_IClassFactory(iface); FIXME("(%p)->(%d),stub!\n",This,dolock); + if(dolock) + InterlockedIncrement(&server_locks); + else + InterlockedDecrement(&server_locks); return S_OK; } @@ -198,7 +204,9 @@ */ HRESULT WINAPI DllCanUnloadNow(void) { - return QUARTZ_DllCanUnloadNow(); + if(server_locks == 0 && QUARTZ_DllCanUnloadNow() == S_OK) + return S_OK; + return S_FALSE; } Modified: trunk/reactos/dll/directx/wine/quartz/mpegsplit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/mp…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/mpegsplit.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/mpegsplit.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -360,7 +360,7 @@ ZeroMemory(pamt, sizeof(*pamt)); ppiOutput->dir = PINDIR_OUTPUT; - ppiOutput->pFilter = (IBaseFilter*)This; + ppiOutput->pFilter = &This->Parser.filter.IBaseFilter_iface; wsprintfW(ppiOutput->achName, wszAudioStream); pamt->formattype = FORMAT_WaveFormatEx; Modified: trunk/reactos/dll/directx/wine/quartz/parser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/pa…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/parser.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/parser.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -445,7 +445,7 @@ CopyMediaType(pin->pmt, amt); pin->dwSamplesProcessed = 0; - pin->pin.pin.pinInfo.pFilter = (LPVOID)This; + pin->pin.pin.pinInfo.pFilter = &This->filter.IBaseFilter_iface; pin->allocProps = *props; This->cStreams++; BaseFilterImpl_IncrementPinVersion(&This->filter); Modified: trunk/reactos/dll/directx/wine/quartz/videorenderer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/vi…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/videorenderer.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/videorenderer.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -771,7 +771,7 @@ { VideoRendererImpl *This = impl_from_IBasicVideo(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } @@ -843,7 +843,7 @@ { VideoRendererImpl *This = impl_from_IVideoWindow(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); } Modified: trunk/reactos/dll/directx/wine/quartz/vmr9.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/quartz/vm…
============================================================================== --- trunk/reactos/dll/directx/wine/quartz/vmr9.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/quartz/vmr9.c [iso-8859-1] Thu Nov 17 22:03:51 2016 @@ -928,7 +928,7 @@ { struct quartz_vmr *This = impl_from_IVideoWindow(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); } @@ -1006,7 +1006,7 @@ { struct quartz_vmr *This = impl_from_IBasicVideo(iface); - TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj); return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj); } @@ -1238,7 +1238,7 @@ { struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface); - TRACE("(%p/%p)->(%p) stub\n", iface, This, mode); + TRACE("(%p/%p)->(%p)\n", iface, This, mode); if (!mode) return E_POINTER; if (This->mode) @@ -1300,7 +1300,7 @@ else info->guid.pGUID = NULL; - CopyRect(&info->rcMonitor, &mi.rcMonitor); + info->rcMonitor = mi.rcMonitor; info->hMon = hmon; info->dwFlags = mi.dwFlags; @@ -1317,7 +1317,7 @@ memset(info, 0, sizeof(*info)); info->uDevID = 0; /* FIXME */ - CopyRect(&info->rcMonitor, &mi.rcMonitor); + info->rcMonitor = mi.rcMonitor; info->hMon = hmon; info->dwFlags = mi.dwFlags; @@ -1661,7 +1661,7 @@ { struct quartz_vmr *This = impl_from_IVMRFilterConfig9(iface); - TRACE("(%p/%p)->(%p) stub\n", iface, This, mode); + TRACE("(%p/%p)->(%p)\n", iface, This, mode); if (!mode) return E_POINTER; 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] Thu Nov 17 22:03:51 2016 @@ -39,7 +39,7 @@ reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/qedit # Synced to WineStaging-1.9.16 -reactos/dll/directx/wine/quartz # Synced to WineStaging-1.9.16 +reactos/dll/directx/wine/quartz # Synced to WineStaging-1.9.23 reactos/dll/directx/wine/wined3d # Synced to WineStaging-1.9.4 reactos/dll/win32/activeds # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73255: [DMUSIC] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:02:00 2016 New Revision: 73255 URL:
http://svn.reactos.org/svn/reactos?rev=73255&view=rev
Log: [DMUSIC] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/directx/wine/dmusic/clock.c trunk/reactos/dll/directx/wine/dmusic/dmusic.c trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h trunk/reactos/dll/directx/wine/dmusic/port.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dmusic/clock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/cl…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/clock.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/clock.c [iso-8859-1] Thu Nov 17 22:02:00 2016 @@ -136,7 +136,7 @@ DMUSIC_LockModule(); hr = IReferenceClockImpl_QueryInterface(&clock->IReferenceClock_iface, riid, ret_iface); - IReferenceClockImpl_Release(&clock->IReferenceClock_iface); + IReferenceClock_Release(&clock->IReferenceClock_iface); return hr; } Modified: trunk/reactos/dll/directx/wine/dmusic/dmusic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmusic.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmusic.c [iso-8859-1] Thu Nov 17 22:02:00 2016 @@ -428,7 +428,7 @@ DMUSIC_LockModule(); ret = IDirectMusic8Impl_QueryInterface(&dmusic->IDirectMusic8_iface, riid, ret_iface); - IDirectMusic8Impl_Release(&dmusic->IDirectMusic8_iface); + IDirectMusic8_Release(&dmusic->IDirectMusic8_iface); return ret; } 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] Thu Nov 17 22:02:00 2016 @@ -57,8 +57,6 @@ typedef struct IReferenceClockImpl IReferenceClockImpl; typedef struct IDirectMusicInstrumentImpl IDirectMusicInstrumentImpl; - -typedef struct SynthPortImpl SynthPortImpl; /***************************************************************************** * Some stuff to make my life easier :=) @@ -162,29 +160,6 @@ LONG ref; /* IDirectMusicDownloadImpl fields */ -}; - -/***************************************************************************** - * SynthPortImpl implementation structure - */ -struct SynthPortImpl { - /* IUnknown fields */ - IDirectMusicPort IDirectMusicPort_iface; - IDirectMusicPortDownload IDirectMusicPortDownload_iface; - IDirectMusicThru IDirectMusicThru_iface; - IKsControl IKsControl_iface; - LONG ref; - - /* IDirectMusicPort fields */ - IDirectSound* pDirectSound; - IReferenceClock* pLatencyClock; - IDirectMusicSynth* synth; - IDirectMusicSynthSink* synth_sink; - BOOL fActive; - DMUS_PORTCAPS caps; - DMUS_PORTPARAMS params; - int nrofgroups; - DMUSIC_PRIVATE_CHANNEL_GROUP group[1]; }; /** Internal factory */ Modified: trunk/reactos/dll/directx/wine/dmusic/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/po…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/port.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/port.c [iso-8859-1] Thu Nov 17 22:02:00 2016 @@ -23,6 +23,23 @@ #include <assert.h> +typedef struct SynthPortImpl { + IDirectMusicPort IDirectMusicPort_iface; + IDirectMusicPortDownload IDirectMusicPortDownload_iface; + IDirectMusicThru IDirectMusicThru_iface; + IKsControl IKsControl_iface; + LONG ref; + IDirectSound *pDirectSound; + IReferenceClock *pLatencyClock; + IDirectMusicSynth *synth; + IDirectMusicSynthSink *synth_sink; + BOOL fActive; + DMUS_PORTCAPS caps; + DMUS_PORTPARAMS params; + int nrofgroups; + DMUSIC_PRIVATE_CHANNEL_GROUP group[1]; +} SynthPortImpl; + static inline IDirectMusicDownloadedInstrumentImpl* impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument *iface) { return CONTAINING_RECORD(iface, IDirectMusicDownloadedInstrumentImpl, IDirectMusicDownloadedInstrument_iface); @@ -43,7 +60,7 @@ return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicThru_iface); } -static inline SynthPortImpl *impl_from_SynthPortImpl_IKsControl(IKsControl *iface) +static inline SynthPortImpl *impl_from_IKsControl(IKsControl *iface) { return CONTAINING_RECORD(iface, SynthPortImpl, IKsControl_iface); } @@ -134,27 +151,23 @@ TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface); - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) { + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) *ret_iface = &This->IDirectMusicPort_iface; - IDirectMusicPort_AddRef((LPDIRECTMUSICPORT)*ret_iface); - return S_OK; - } else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) { + else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) *ret_iface = &This->IDirectMusicPortDownload_iface; - IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ret_iface); - return S_OK; - } else if (IsEqualGUID(riid, &IID_IDirectMusicThru)) { + else if (IsEqualGUID(riid, &IID_IDirectMusicThru)) *ret_iface = &This->IDirectMusicThru_iface; - IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ret_iface); - return S_OK; - } else if (IsEqualGUID(riid, &IID_IKsControl)) { + else if (IsEqualGUID(riid, &IID_IKsControl)) *ret_iface = &This->IKsControl_iface; - IKsControl_AddRef((IKsControl*)*ret_iface); - return S_OK; - } - - WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface); - - return E_NOINTERFACE; + else { + WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface); + *ret_iface = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ret_iface); + + return S_OK; } static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface) @@ -680,73 +693,73 @@ SynthPortImpl_IDirectMusicThru_ThruChannel }; -static HRESULT WINAPI SynthPortImpl_IKsControl_QueryInterface(IKsControl* iface, REFIID riid, LPVOID *ppobj) -{ - SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface); - - return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ppobj); -} - -static ULONG WINAPI SynthPortImpl_IKsControl_AddRef(IKsControl* iface) -{ - SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface); +static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface, REFIID riid, + void **ret_iface) +{ + SynthPortImpl *This = impl_from_IKsControl(iface); + + return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface); +} + +static ULONG WINAPI IKsControlImpl_AddRef(IKsControl *iface) +{ + SynthPortImpl *This = impl_from_IKsControl(iface); return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface); } -static ULONG WINAPI SynthPortImpl_IKsControl_Release(IKsControl* iface) -{ - SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface); +static ULONG WINAPI IKsControlImpl_Release(IKsControl *iface) +{ + SynthPortImpl *This = impl_from_IKsControl(iface); return IDirectMusicPort_Release(&This->IDirectMusicPort_iface); } -static HRESULT WINAPI SynthPortImpl_IKsControl_KsProperty(IKsControl* iface, PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData, - ULONG DataLength, ULONG* BytesReturned) -{ - TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, Property, PropertyLength, PropertyData, DataLength, BytesReturned); - - TRACE("Property = %s - %u - %u\n", debugstr_guid(&Property->Set), Property->Id, Property->Flags); - - if (Property->Flags != KSPROPERTY_TYPE_GET) - { - FIXME("Property flags %u not yet supported\n", Property->Flags); +static HRESULT WINAPI IKsControlImpl_KsProperty(IKsControl *iface, KSPROPERTY *prop, + ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len) +{ + TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, prop, prop_len, data, data_len, ret_len); + TRACE("prop = %s - %u - %u\n", debugstr_guid(&prop->Set), prop->Id, prop->Flags); + + if (prop->Flags != KSPROPERTY_TYPE_GET) + { + FIXME("prop flags %u not yet supported\n", prop->Flags); return S_FALSE; } - if (DataLength < sizeof(DWORD)) + if (data_len < sizeof(DWORD)) return E_NOT_SUFFICIENT_BUFFER; - FIXME("Unknown property %s\n", debugstr_guid(&Property->Set)); - *(DWORD*)PropertyData = FALSE; - *BytesReturned = sizeof(DWORD); - - return S_OK; -} - -static HRESULT WINAPI SynthPortImpl_IKsControl_KsMethod(IKsControl* iface, PKSMETHOD Method, ULONG MethodLength, LPVOID MethodData, - ULONG DataLength, ULONG* BytesReturned) -{ - FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, Method, MethodLength, MethodData, DataLength, BytesReturned); + FIXME("Unknown property %s\n", debugstr_guid(&prop->Set)); + *(DWORD*)data = FALSE; + *ret_len = sizeof(DWORD); + + return S_OK; +} + +static HRESULT WINAPI IKsControlImpl_KsMethod(IKsControl *iface, KSMETHOD *method, + ULONG method_len, void *data, ULONG data_len, ULONG *ret_len) +{ + FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, method, method_len, data, data_len, ret_len); return E_NOTIMPL; } -static HRESULT WINAPI SynthPortImpl_IKsControl_KsEvent(IKsControl* iface, PKSEVENT Event, ULONG EventLength, LPVOID EventData, - ULONG DataLength, ULONG* BytesReturned) -{ - FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, Event, EventLength, EventData, DataLength, BytesReturned); +static HRESULT WINAPI IKsControlImpl_KsEvent(IKsControl *iface, KSEVENT *event, ULONG event_len, + void *data, ULONG data_len, ULONG *ret_len) +{ + FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, event, event_len, data, data_len, ret_len); return E_NOTIMPL; } -static const IKsControlVtbl SynthPortImpl_IKsControl_Vtbl = { - SynthPortImpl_IKsControl_QueryInterface, - SynthPortImpl_IKsControl_AddRef, - SynthPortImpl_IKsControl_Release, - SynthPortImpl_IKsControl_KsProperty, - SynthPortImpl_IKsControl_KsMethod, - SynthPortImpl_IKsControl_KsEvent +static const IKsControlVtbl ikscontrol_vtbl = { + IKsControlImpl_QueryInterface, + IKsControlImpl_AddRef, + IKsControlImpl_Release, + IKsControlImpl_KsProperty, + IKsControlImpl_KsMethod, + IKsControlImpl_KsEvent }; HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device) @@ -767,7 +780,7 @@ obj->IDirectMusicPort_iface.lpVtbl = &SynthPortImpl_DirectMusicPort_Vtbl; obj->IDirectMusicPortDownload_iface.lpVtbl = &SynthPortImpl_DirectMusicPortDownload_Vtbl; obj->IDirectMusicThru_iface.lpVtbl = &SynthPortImpl_DirectMusicThru_Vtbl; - obj->IKsControl_iface.lpVtbl = &SynthPortImpl_IKsControl_Vtbl; + obj->IKsControl_iface.lpVtbl = &ikscontrol_vtbl; obj->ref = 0; /* Will be inited by QueryInterface */ obj->fActive = FALSE; obj->params = *port_params; 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] Thu Nov 17 22:02:00 2016 @@ -32,7 +32,7 @@ reactos/dll/directx/wine/devenum # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/dinput # Synced to WineStaging-1.9.23 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.9.11 -reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.16 +reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.23 reactos/dll/directx/wine/dplay # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
8 years, 1 month
1
0
0
0
[akhaldi] 73254: [DINPUT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:00:07 2016 New Revision: 73254 URL:
http://svn.reactos.org/svn/reactos?rev=73254&view=rev
Log: [DINPUT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/dinput/joystick.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] Thu Nov 17 22:00:07 2016 @@ -147,12 +147,121 @@ hr = IDirectInputDevice_SetProperty(info->pJoystick, DIPROP_DEADZONE, &dipdw.diph); ok(hr==DI_OK,"IDirectInputDevice_SetProperty() failed: %08x\n", hr); + /* ensure DIDOI_ASPECTPOSITION is set for axes objects */ + ok(pdidoi->dwFlags & DIDOI_ASPECTPOSITION, "Missing DIDOI_ASPECTPOSITION, flags are 0x%x\n", + pdidoi->dwFlags); + info->axis++; } else if (IsEqualIID(&pdidoi->guidType, &GUID_POV)) info->pov++; else if (IsEqualIID(&pdidoi->guidType, &GUID_Button)) info->button++; + return DIENUM_CONTINUE; +} + +static const struct effect_id +{ + const GUID *guid; + int dieft; + const char *name; +} effect_conversion[] = { + {&GUID_ConstantForce, DIEFT_CONSTANTFORCE, "Constant"}, + {&GUID_RampForce, DIEFT_RAMPFORCE, "Ramp"}, + {&GUID_Square, DIEFT_PERIODIC, "Square"}, + {&GUID_Sine, DIEFT_PERIODIC, "Sine"}, + {&GUID_Triangle, DIEFT_PERIODIC, "Triangle"}, + {&GUID_SawtoothUp, DIEFT_PERIODIC, "Saw Tooth Up"}, + {&GUID_SawtoothDown, DIEFT_PERIODIC, "Saw Tooth Down"}, + {&GUID_Spring, DIEFT_CONDITION, "Spring"}, + {&GUID_Damper, DIEFT_CONDITION, "Damper"}, + {&GUID_Inertia, DIEFT_CONDITION, "Inertia"}, + {&GUID_Friction, DIEFT_CONDITION, "Friction"}, + {&GUID_CustomForce, DIEFT_CUSTOMFORCE, "Custom"} +}; + +static const struct effect_id* effect_from_guid(const GUID *guid) +{ + unsigned int i; + for (i = 0; i < sizeof(effect_conversion) / sizeof(effect_conversion[0]); i++) + if (IsEqualGUID(guid, effect_conversion[i].guid)) + return &effect_conversion[i]; + return NULL; +} + +struct effect_enum +{ + DIEFFECT eff; + GUID guid; + int effect_count; + const char *effect_name; +}; + +/* The last enumerated effect will be used for force feedback testing */ +static BOOL CALLBACK EnumEffects(const DIEFFECTINFOA *lpef, void *ref) +{ + const struct effect_id *id = effect_from_guid(&lpef->guid); + static union + { + DICONSTANTFORCE constant; + DIPERIODIC periodic; + DIRAMPFORCE ramp; + DICONDITION condition[2]; + } specific; + struct effect_enum *data = ref; + int type = DIDFT_GETTYPE(lpef->dwEffType); + + /* Insanity check */ + if (!id) + { + ok(0, "unsupported effect enumerated, GUID %s!\n", wine_dbgstr_guid(&lpef->guid)); + return DIENUM_CONTINUE; + } + trace("controller supports '%s' effect\n", id->name); + ok(type == id->dieft, "Invalid effect type, expected 0x%x, got 0x%x\n", + id->dieft, lpef->dwEffType); + + /* Can't use custom for test as we don't know the data format */ + if (type == DIEFT_CUSTOMFORCE) + return DIENUM_CONTINUE; + + data->effect_count++; + data->effect_name = id->name; + data->guid = *id->guid; + + ZeroMemory(&specific, sizeof(specific)); + switch (type) + { + case DIEFT_PERIODIC: + data->eff.cbTypeSpecificParams = sizeof(specific.periodic); + data->eff.lpvTypeSpecificParams = &specific.periodic; + specific.periodic.dwMagnitude = DI_FFNOMINALMAX / 2; + specific.periodic.dwPeriod = DI_SECONDS; /* 1 second */ + break; + case DIEFT_CONSTANTFORCE: + data->eff.cbTypeSpecificParams = sizeof(specific.constant); + data->eff.lpvTypeSpecificParams = &specific.constant; + specific.constant.lMagnitude = DI_FFNOMINALMAX / 2; + break; + case DIEFT_RAMPFORCE: + data->eff.cbTypeSpecificParams = sizeof(specific.ramp); + data->eff.lpvTypeSpecificParams = &specific.ramp; + specific.ramp.lStart = -DI_FFNOMINALMAX / 2; + specific.ramp.lEnd = +DI_FFNOMINALMAX / 2; + break; + case DIEFT_CONDITION: + { + int i; + data->eff.cbTypeSpecificParams = sizeof(specific.condition); + data->eff.lpvTypeSpecificParams = specific.condition; + for (i = 0; i < 2; i++) + { + specific.condition[i].lNegativeCoefficient = -DI_FFNOMINALMAX / 2; + specific.condition[i].lPositiveCoefficient = +DI_FFNOMINALMAX / 2; + } + break; + } + } return DIENUM_CONTINUE; } @@ -187,6 +296,14 @@ WCHAR nameBuffer[MAX_PATH]; HWND hWnd = get_hwnd(); char oldstate[248], curstate[248]; + DWORD axes[2] = {DIJOFS_X, DIJOFS_Y}; + LONG direction[2] = {0, 0}; + LPDIRECTINPUTEFFECT effect = NULL; + LONG cnt1, cnt2; + HWND real_hWnd; + HINSTANCE hInstance = GetModuleHandleW(NULL); + DIPROPDWORD dip_gain_set, dip_gain_get; + struct effect_enum effect_data; ok(data->version > 0x0300, "Joysticks not supported in version 0x%04x\n", data->version); @@ -208,7 +325,27 @@ if (hr!=DI_OK) goto DONE; - trace("---- %s ----\n", lpddi->tszProductName); + trace("---- Controller Information ----\n" + "Product Name : %s\n" + "Instance Name : %s\n" + "devType : 0x%08x\n" + "GUID Product : %s\n" + "GUID Instance : %s\n" + "HID Page : 0x%04x\n" + "HID Usage : 0x%04x\n", + lpddi->tszProductName, + lpddi->tszInstanceName, + lpddi->dwDevType, + wine_dbgstr_guid(&lpddi->guidProduct), + wine_dbgstr_guid(&lpddi->guidInstance), + lpddi->wUsagePage, + lpddi->wUsage); + + /* Check if this is a HID device */ + if (lpddi->dwDevType & DIDEVTYPE_HID) + ok(lpddi->wUsagePage == 0x01 && (lpddi->wUsage == 0x04 || lpddi->wUsage == 0x05), + "Expected a game controller HID UsagePage and Usage, got page 0x%x usage 0x%x\n", + lpddi->wUsagePage, lpddi->wUsage); /* Test for joystick ID property */ ZeroMemory(&dipw, sizeof(dipw)); @@ -232,6 +369,14 @@ /* Test if instance name is the same as present in DIDEVICEINSTANCE */ MultiByteToWideChar(CP_ACP, 0, lpddi->tszInstanceName, -1, nameBuffer, MAX_PATH); ok(!lstrcmpW(nameBuffer, dps.wsz), "DIPROP_INSTANCENAME returned is wrong. Expected: %s Got: %s\n", + wine_dbgstr_w(nameBuffer), wine_dbgstr_w(dps.wsz)); + + hr = IDirectInputDevice_GetProperty(pJoystick, DIPROP_PRODUCTNAME, &dps.diph); + ok(SUCCEEDED(hr), "IDirectInput_GetProperty() for DIPROP_PRODUCTNAME failed: %08x\n", hr); + + /* Test if product name is the same as present in DIDEVICEINSTANCE */ + MultiByteToWideChar(CP_ACP, 0, lpddi->tszProductName, -1, nameBuffer, MAX_PATH); + ok(!lstrcmpW(nameBuffer, dps.wsz), "DIPROP_PRODUCTNAME returned is wrong. Expected: %s Got: %s\n", wine_dbgstr_w(nameBuffer), wine_dbgstr_w(dps.wsz)); /* Test for GUIDPATH properties */ @@ -357,54 +502,62 @@ ok(js.rgdwPOV[3] == -1, "Default for unassigned POV should be -1 not: %d\n", js.rgdwPOV[3]); } + trace("Testing force feedback\n"); + ZeroMemory(&effect_data, sizeof(effect_data)); + effect_data.eff.dwSize = sizeof(effect_data.eff); + effect_data.eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; + effect_data.eff.dwDuration = INFINITE; + effect_data.eff.dwGain = DI_FFNOMINALMAX; + effect_data.eff.dwTriggerButton = DIEB_NOTRIGGER; + effect_data.eff.cAxes = sizeof(axes) / sizeof(axes[0]); + effect_data.eff.rgdwAxes = axes; + effect_data.eff.rglDirection = direction; + + /* Sending effects to joystick requires + * calling IDirectInputEffect_Initialize, which requires + * having exclusive access to the device, which requires + * - not having acquired the joystick when calling + * IDirectInputDevice_SetCooperativeLevel + * - a visible window + */ + real_hWnd = CreateWindowExA(0, "EDIT", "Test text", 0, 10, 10, 300, 300, NULL, NULL, + hInstance, NULL); + ok(real_hWnd!=0,"CreateWindowExA failed: %p\n", real_hWnd); + ShowWindow(real_hWnd, SW_SHOW); + hr = IDirectInputDevice_Unacquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); + hr = IDirectInputDevice_SetCooperativeLevel(pJoystick, real_hWnd, + DISCL_EXCLUSIVE | DISCL_FOREGROUND); + ok(hr==DI_OK,"IDirectInputDevice_SetCooperativeLevel() failed: %08x\n", hr); + hr = IDirectInputDevice_Acquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); + + cnt1 = get_refcount((IUnknown*)pJoystick); + + hr = IDirectInputDevice2_EnumEffects((IDirectInputDevice2A*)pJoystick, EnumEffects, &effect_data, DIEFT_ALL); + ok(hr==DI_OK,"IDirectInputDevice2_EnumEffects() failed: %08x\n", hr); + + /* If the controller does not support ANY effect use the constant effect to make + * CreateEffect fail but with the unsupported reason instead of invalid parameters. */ + if (!effect_data.effect_count) + { + static DICONSTANTFORCE constant; + effect_data.guid = GUID_ConstantForce; + effect_data.eff.cbTypeSpecificParams = sizeof(constant); + effect_data.eff.lpvTypeSpecificParams = &constant; + effect_data.effect_name = "Constant"; + constant.lMagnitude = DI_FFNOMINALMAX / 2; + + ok(!(caps.dwFlags & DIDC_FORCEFEEDBACK), "effect count is zero but controller supports force feedback?\n"); + } + + effect = (void *)0xdeadbeef; + hr = IDirectInputDevice2_CreateEffect((IDirectInputDevice2A*)pJoystick, &effect_data.guid, + &effect_data.eff, &effect, NULL); if (caps.dwFlags & DIDC_FORCEFEEDBACK) { - DWORD axes[2] = {DIJOFS_X, DIJOFS_Y}; - LONG direction[2] = {0, 0}; - DICONSTANTFORCE force = {0}; - DIEFFECT eff; - LPDIRECTINPUTEFFECT effect = NULL; - LONG cnt1, cnt2; - HWND real_hWnd; - HINSTANCE hInstance = GetModuleHandleW(NULL); - DIPROPDWORD dip_gain_set, dip_gain_get; - - trace("Testing force-feedback\n"); - memset(&eff, 0, sizeof(eff)); - eff.dwSize = sizeof(eff); - eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; - eff.dwDuration = INFINITE; - eff.dwGain = DI_FFNOMINALMAX; - eff.dwTriggerButton = DIEB_NOTRIGGER; - eff.cAxes = sizeof(axes) / sizeof(axes[0]); - eff.rgdwAxes = axes; - eff.rglDirection = direction; - eff.cbTypeSpecificParams = sizeof(force); - eff.lpvTypeSpecificParams = &force; - - /* Sending effects to joystick requires - * calling IDirectInputEffect_Initialize, which requires - * having exclusive access to the device, which requires - * - not having acquired the joystick when calling - * IDirectInputDevice_SetCooperativeLevel - * - a visible window - */ - real_hWnd = CreateWindowExA(0, "EDIT", "Test text", 0, 10, 10, 300, 300, NULL, NULL, - hInstance, NULL); - ok(real_hWnd!=0,"CreateWindowExA failed: %p\n", real_hWnd); - ShowWindow(real_hWnd, SW_SHOW); - hr = IDirectInputDevice_Unacquire(pJoystick); - ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); - hr = IDirectInputDevice_SetCooperativeLevel(pJoystick, real_hWnd, - DISCL_EXCLUSIVE | DISCL_FOREGROUND); - ok(hr==DI_OK,"IDirectInputDevice_SetCooperativeLevel() failed: %08x\n", hr); - hr = IDirectInputDevice_Acquire(pJoystick); - ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); - - cnt1 = get_refcount((IUnknown*)pJoystick); - - hr = IDirectInputDevice2_CreateEffect((IDirectInputDevice2A*)pJoystick, &GUID_ConstantForce, - &eff, &effect, NULL); + trace("force feedback supported with %d effects, using '%s' for test\n", + effect_data.effect_count, effect_data.effect_name); ok(hr == DI_OK, "IDirectInputDevice_CreateEffect() failed: %08x\n", hr); cnt2 = get_refcount((IUnknown*)pJoystick); ok(cnt1 == cnt2, "Ref count is wrong %d != %d\n", cnt1, cnt2); @@ -416,9 +569,9 @@ GUID guid = {0}; hr = IDirectInputEffect_Initialize(effect, hInstance, data->version, - &GUID_ConstantForce); + &effect_data.guid); ok(hr==DI_OK,"IDirectInputEffect_Initialize failed: %08x\n", hr); - hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_AXES | DIEP_DIRECTION | + hr = IDirectInputEffect_SetParameters(effect, &effect_data.eff, DIEP_AXES | DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS); ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); if (hr==DI_OK) { @@ -428,7 +581,7 @@ ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); hr = IDirectInputDevice_Acquire(pJoystick); ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); - hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_GAIN); + hr = IDirectInputEffect_SetParameters(effect, &effect_data.eff, DIEP_GAIN); ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); } @@ -446,10 +599,13 @@ * - effects are preserved (Download + Start doesn't complain * about incomplete effect) */ + hr = IDirectInputEffect_GetEffectStatus(effect, NULL); + ok(hr==E_POINTER,"IDirectInputEffect_GetEffectStatus() must fail with E_POINTER, got: %08x\n", hr); + effect_status = 0xdeadbeef; hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); ok(effect_status==0,"IDirectInputEffect_GetEffectStatus() reported effect as started\n"); - hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_START); + hr = IDirectInputEffect_SetParameters(effect, &effect_data.eff, DIEP_START); ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); @@ -467,10 +623,11 @@ ok(hr==DI_OK,"IDirectInputEffect_Start() failed: %08x\n", hr); hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); + Sleep(250); /* feel the magic */ todo_wine ok(effect_status!=0,"IDirectInputEffect_GetEffectStatus() reported effect as stopped\n"); hr = IDirectInputEffect_GetEffectGuid(effect, &guid); ok(hr==DI_OK,"IDirectInputEffect_GetEffectGuid() failed: %08x\n", hr); - ok(IsEqualGUID(&GUID_ConstantForce, &guid), "Wrong guid returned\n"); + ok(IsEqualGUID(&effect_data.guid, &guid), "Wrong guid returned\n"); /* Check autocenter status * State: initially stopped @@ -592,18 +749,27 @@ } cnt1 = get_refcount((IUnknown*)pJoystick); ok(cnt1 == cnt2, "Ref count is wrong %d != %d\n", cnt1, cnt2); - - /* Before destroying the window, release joystick to revert to - * non-exclusive, background cooperative level. */ - hr = IDirectInputDevice_Unacquire(pJoystick); - ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); - hr = IDirectInputDevice_SetCooperativeLevel(pJoystick, hWnd, - DISCL_NONEXCLUSIVE | DISCL_BACKGROUND); - ok(hr==DI_OK,"IDirectInputDevice_SetCooperativeLevel() failed: %08x\n", hr); - DestroyWindow (real_hWnd); - hr = IDirectInputDevice_Acquire(pJoystick); - ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); } + /* No force feedback support, CreateEffect is supposed to fail. Fairy Bloom Freesia + * calls CreateEffect without checking the DIDC_FORCEFEEDBACK. It expects the correct + * error return to determine if force feedback is unsupported. */ + else + { + trace("No force feedback support\n"); + ok(hr==DIERR_UNSUPPORTED, "IDirectInputDevice_CreateEffect() must fail with DIERR_UNSUPPORTED, got: %08x\n", hr); + ok(effect == NULL, "effect must be NULL, got %p\n", effect); + } + + /* Before destroying the window, release joystick to revert to + * non-exclusive, background cooperative level. */ + hr = IDirectInputDevice_Unacquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); + hr = IDirectInputDevice_SetCooperativeLevel(pJoystick, hWnd, + DISCL_NONEXCLUSIVE | DISCL_BACKGROUND); + ok(hr==DI_OK,"IDirectInputDevice_SetCooperativeLevel() failed: %08x\n", hr); + DestroyWindow (real_hWnd); + hr = IDirectInputDevice_Acquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); if (winetest_interactive) { trace("You have 30 seconds to test all axes, sliders, POVs and buttons\n");
8 years, 1 month
1
0
0
0
[akhaldi] 73253: [D3DRM_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 21:59:05 2016 New Revision: 73253 URL:
http://svn.reactos.org/svn/reactos?rev=73253&view=rev
Log: [D3DRM_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/d3drm/d3drm.c Modified: trunk/rostests/winetests/d3drm/d3drm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/d3drm/d3drm.c?r…
============================================================================== --- trunk/rostests/winetests/d3drm/d3drm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/d3drm/d3drm.c [iso-8859-1] Thu Nov 17 21:59:05 2016 @@ -885,6 +885,7 @@ IDirect3DRMFrame *pFrameP1; IDirect3DRMFrame *pFrameP2; IDirect3DRMFrame *pFrameTmp; + IDirect3DRMFrame *scene_frame; IDirect3DRMFrameArray *frame_array; IDirect3DRMMeshBuilder *mesh_builder; IDirect3DRMVisual *visual1; @@ -966,6 +967,19 @@ ok(hr == D3DRM_OK, "Cannot add child frame (hr = %x)\n", hr); CHECK_REFCOUNT(pFrameP1, 1); CHECK_REFCOUNT(pFrameC, 2); + + hr = IDirect3DRMFrame_GetScene(pFrameC, NULL); + ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr); + hr = IDirect3DRMFrame_GetScene(pFrameC, &scene_frame); + ok(SUCCEEDED(hr), "Cannot get scene (hr == %#x).\n", hr); + ok(scene_frame == pFrameP1, "Expected scene frame == %p, got %p.\n", pFrameP1, scene_frame); + CHECK_REFCOUNT(pFrameP1, 2); + IDirect3DRMFrame_Release(scene_frame); + hr = IDirect3DRMFrame_GetScene(pFrameP1, &scene_frame); + ok(SUCCEEDED(hr), "Cannot get scene (hr == %#x).\n", hr); + ok(scene_frame == pFrameP1, "Expected scene frame == %p, got %p.\n", pFrameP1, scene_frame); + CHECK_REFCOUNT(pFrameP1, 2); + IDirect3DRMFrame_Release(scene_frame); frame_array = NULL; hr = IDirect3DRMFrame_GetChildren(pFrameP1, &frame_array); @@ -1032,6 +1046,16 @@ ok(pFrameTmp == NULL, "pFrameTmp = %p\n", pFrameTmp); IDirect3DRMFrameArray_Release(frame_array); } + hr = IDirect3DRMFrame_GetScene(pFrameC, &scene_frame); + ok(SUCCEEDED(hr), "Cannot get scene (hr == %#x).\n", hr); + ok(scene_frame == pFrameP2, "Expected scene frame == %p, got %p.\n", pFrameP2, scene_frame); + CHECK_REFCOUNT(pFrameP2, 2); + IDirect3DRMFrame_Release(scene_frame); + hr = IDirect3DRMFrame_GetScene(pFrameP2, &scene_frame); + ok(SUCCEEDED(hr), "Cannot get scene (hr == %#x).\n", hr); + ok(scene_frame == pFrameP2, "Expected scene frame == %p, got %p.\n", pFrameP2, scene_frame); + CHECK_REFCOUNT(pFrameP2, 2); + IDirect3DRMFrame_Release(scene_frame); pFrameTmp = (void*)0xdeadbeef; hr = IDirect3DRMFrame_GetParent(pFrameC, &pFrameTmp); @@ -5838,6 +5862,679 @@ IDirect3DRM_Release(d3drm1); } +static D3DCOLOR get_surface_color(IDirectDrawSurface *surface, UINT x, UINT y) +{ + RECT rect = { x, y, x + 1, y + 1 }; + DDSURFACEDESC surface_desc; + D3DCOLOR color; + HRESULT hr; + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + + hr = IDirectDrawSurface_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); + ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr); + if (FAILED(hr)) + return 0xdeadbeef; + + color = *((DWORD *)surface_desc.lpSurface) & 0x00ffffff; + + hr = IDirectDrawSurface_Unlock(surface, NULL); + ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); + + return color; +} + +static IDirect3DDevice2 *create_device2_without_ds(IDirectDraw2 *ddraw, HWND window) +{ + IDirectDrawSurface *surface; + IDirect3DDevice2 *device = NULL; + DDSURFACEDESC surface_desc; + IDirect3D2 *d3d; + HRESULT hr; + RECT rc; + + GetClientRect(window, &rc); + hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); + + memset(&surface_desc, 0, sizeof(surface_desc)); + surface_desc.dwSize = sizeof(surface_desc); + surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; + surface_desc.dwWidth = rc.right; + surface_desc.dwHeight = rc.bottom; + + hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL); + ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr); + + hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d); + if (FAILED(hr)) + { + IDirectDrawSurface_Release(surface); + return NULL; + } + + IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device); + + IDirect3D2_Release(d3d); + IDirectDrawSurface_Release(surface); + return device; +} + +static BOOL compare_color(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff) +{ + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; + return TRUE; +} + +static void clear_depth_surface(IDirectDrawSurface *surface, DWORD value) +{ + HRESULT hr; + DDBLTFX fx; + + memset(&fx, 0, sizeof(fx)); + fx.dwSize = sizeof(fx); + U5(fx).dwFillDepth = value; + + hr = IDirectDrawSurface_Blt(surface, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); +} + +static void set_execute_data(IDirect3DExecuteBuffer *execute_buffer, UINT vertex_count, UINT offset, UINT len) +{ + D3DEXECUTEDATA exec_data; + HRESULT hr; + + memset(&exec_data, 0, sizeof(exec_data)); + exec_data.dwSize = sizeof(exec_data); + exec_data.dwVertexCount = vertex_count; + exec_data.dwInstructionOffset = offset; + exec_data.dwInstructionLength = len; + hr = IDirect3DExecuteBuffer_SetExecuteData(execute_buffer, &exec_data); + ok(SUCCEEDED(hr), "Failed to set execute data, hr %#x.\n", hr); +} + +static void emit_set_ts(void **ptr, D3DTRANSFORMSTATETYPE state, DWORD value) +{ + D3DINSTRUCTION *inst = *ptr; + D3DSTATE *ts = (D3DSTATE *)(inst + 1); + + inst->bOpcode = D3DOP_STATETRANSFORM; + inst->bSize = sizeof(*ts); + inst->wCount = 1; + + U1(*ts).dtstTransformStateType = state; + U2(*ts).dwArg[0] = value; + + *ptr = ts + 1; +} + +static void emit_set_rs(void **ptr, D3DRENDERSTATETYPE state, DWORD value) +{ + D3DINSTRUCTION *inst = *ptr; + D3DSTATE *rs = (D3DSTATE *)(inst + 1); + + inst->bOpcode = D3DOP_STATERENDER; + inst->bSize = sizeof(*rs); + inst->wCount = 1; + + U1(*rs).drstRenderStateType = state; + U2(*rs).dwArg[0] = value; + + *ptr = rs + 1; +} + +static void emit_process_vertices(void **ptr, DWORD flags, WORD base_idx, DWORD vertex_count) +{ + D3DINSTRUCTION *inst = *ptr; + D3DPROCESSVERTICES *pv = (D3DPROCESSVERTICES *)(inst + 1); + + inst->bOpcode = D3DOP_PROCESSVERTICES; + inst->bSize = sizeof(*pv); + inst->wCount = 1; + + pv->dwFlags = flags; + pv->wStart = base_idx; + pv->wDest = 0; + pv->dwCount = vertex_count; + pv->dwReserved = 0; + + *ptr = pv + 1; +} + +static void emit_tquad(void **ptr, WORD base_idx) +{ + D3DINSTRUCTION *inst = *ptr; + D3DTRIANGLE *tri = (D3DTRIANGLE *)(inst + 1); + + inst->bOpcode = D3DOP_TRIANGLE; + inst->bSize = sizeof(*tri); + inst->wCount = 2; + + U1(*tri).v1 = base_idx; + U2(*tri).v2 = base_idx + 1; + U3(*tri).v3 = base_idx + 2; + tri->wFlags = D3DTRIFLAG_START; + ++tri; + + U1(*tri).v1 = base_idx + 2; + U2(*tri).v2 = base_idx + 1; + U3(*tri).v3 = base_idx + 3; + tri->wFlags = D3DTRIFLAG_ODD; + ++tri; + + *ptr = tri; +} + +static void emit_end(void **ptr) +{ + D3DINSTRUCTION *inst = *ptr; + + inst->bOpcode = D3DOP_EXIT; + inst->bSize = 0; + inst->wCount = 0; + + *ptr = inst + 1; +} + +static void d3d_draw_quad1(IDirect3DDevice *device, IDirect3DViewport *viewport) +{ + IDirect3DExecuteBuffer *execute_buffer; + D3DEXECUTEBUFFERDESC exec_desc; + HRESULT hr; + void *ptr; + UINT inst_length; + D3DMATRIXHANDLE world_handle, view_handle, proj_handle; + static D3DMATRIX mat = + { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }; + static const D3DLVERTEX quad_strip[] = + { + {{-1.0f}, {-1.0f}, {0.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}}, + {{-1.0f}, { 1.0f}, {0.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}}, + {{ 1.0f}, {-1.0f}, {1.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}}, + {{ 1.0f}, { 1.0f}, {1.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}}, + }; + + hr = IDirect3DDevice_CreateMatrix(device, &world_handle); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + hr = IDirect3DDevice_SetMatrix(device, world_handle, &mat); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + hr = IDirect3DDevice_CreateMatrix(device, &view_handle); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + hr = IDirect3DDevice_SetMatrix(device, view_handle, &mat); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + hr = IDirect3DDevice_CreateMatrix(device, &proj_handle); + ok(hr == D3D_OK, "Creating a matrix object failed, hr %#x.\n", hr); + hr = IDirect3DDevice_SetMatrix(device, proj_handle, &mat); + ok(hr == D3D_OK, "Setting a matrix object failed, hr %#x.\n", hr); + + memset(&exec_desc, 0, sizeof(exec_desc)); + exec_desc.dwSize = sizeof(exec_desc); + exec_desc.dwFlags = D3DDEB_BUFSIZE | D3DDEB_CAPS; + exec_desc.dwBufferSize = 1024; + exec_desc.dwCaps = D3DDEBCAPS_SYSTEMMEMORY; + + hr = IDirect3DDevice_CreateExecuteBuffer(device, &exec_desc, &execute_buffer, NULL); + ok(SUCCEEDED(hr), "Failed to create execute buffer, hr %#x.\n", hr); + + hr = IDirect3DExecuteBuffer_Lock(execute_buffer, &exec_desc); + ok(SUCCEEDED(hr), "Failed to lock execute buffer, hr %#x.\n", hr); + + memcpy(exec_desc.lpData, quad_strip, sizeof(quad_strip)); + ptr = ((BYTE *)exec_desc.lpData) + sizeof(quad_strip); + emit_set_ts(&ptr, D3DTRANSFORMSTATE_WORLD, world_handle); + emit_set_ts(&ptr, D3DTRANSFORMSTATE_VIEW, view_handle); + emit_set_ts(&ptr, D3DTRANSFORMSTATE_PROJECTION, proj_handle); + emit_set_rs(&ptr, D3DRENDERSTATE_CLIPPING, FALSE); + emit_set_rs(&ptr, D3DRENDERSTATE_ZENABLE, TRUE); + emit_set_rs(&ptr, D3DRENDERSTATE_FOGENABLE, FALSE); + emit_set_rs(&ptr, D3DRENDERSTATE_CULLMODE, D3DCULL_NONE); + emit_set_rs(&ptr, D3DRENDERSTATE_SHADEMODE, D3DSHADE_FLAT); + + emit_process_vertices(&ptr, D3DPROCESSVERTICES_TRANSFORM, 0, 4); + emit_tquad(&ptr, 0); + + emit_end(&ptr); + inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData; + inst_length -= sizeof(quad_strip); + + hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); + ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); + + hr = IDirect3DDevice_BeginScene(device); + set_execute_data(execute_buffer, 4, sizeof(quad_strip), inst_length); + hr = IDirect3DDevice_Execute(device, execute_buffer, viewport, D3DEXECUTE_CLIPPED); + ok(SUCCEEDED(hr), "Failed to execute exec buffer, hr %#x.\n", hr); + hr = IDirect3DDevice_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + + IDirect3DExecuteBuffer_Release(execute_buffer); +} + +static void test_viewport_clear1(void) +{ + DDSCAPS caps = { DDSCAPS_ZBUFFER }; + IDirectDraw *ddraw; + IDirectDrawClipper *clipper; + IDirect3DRM *d3drm1; + IDirect3DRMFrame *frame1, *camera1; + IDirect3DRMDevice *device1; + IDirect3DViewport *d3d_viewport; + IDirect3DRMViewport *viewport1; + IDirect3DDevice *d3d_device1; + IDirectDrawSurface *surface, *ds, *d3drm_ds; + HWND window; + GUID driver = IID_IDirect3DRGBDevice; + HRESULT hr; + D3DCOLOR ret_color; + RECT rc; + + window = CreateWindowA("static", "d3drm_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); + GetClientRect(window, &rc); + + hr = DirectDrawCreate(NULL, &ddraw, NULL); + ok(SUCCEEDED(hr), "Cannot create IDirectDraw interface (hr = %#x).\n", hr); + + hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); + ok(SUCCEEDED(hr), "Failed to set cooperative level (hr = %#x).\n", hr); + + hr = IDirectDraw_CreateClipper(ddraw, 0, &clipper, NULL); + ok(SUCCEEDED(hr), "Cannot create clipper (hr = %#x).\n", hr); + + hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); + ok(SUCCEEDED(hr), "Cannot set HWnd to Clipper (hr = %#x)\n", hr); + + hr = Direct3DRMCreate(&d3drm1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRM interface (hr = %#x).\n", hr); + + hr = IDirect3DRM_CreateDeviceFromClipper(d3drm1, clipper, &driver, rc.right, rc.bottom, &device1); + ok(hr == D3DRM_OK, "Cannot get IDirect3DRMDevice interface (hr = %#x)\n", hr); + + hr = IDirect3DRM_CreateFrame(d3drm1, NULL, &frame1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMFrame interface (hr = %#x)\n", hr); + hr = IDirect3DRM_CreateFrame(d3drm1, frame1, &camera1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMFrame interface (hr = %#x)\n", hr); + + hr = IDirect3DRM_CreateViewport(d3drm1, device1, camera1, 0, 0, rc.right, + rc.bottom, &viewport1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMViewport2 interface (hr = %#x)\n", hr); + + /* Fetch immediate mode device and viewport */ + hr = IDirect3DRMDevice_GetDirect3DDevice(device1, &d3d_device1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DDevice interface (hr = %#x).\n", hr); + hr = IDirect3DRMViewport_GetDirect3DViewport(viewport1, &d3d_viewport); + ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport interface (hr = %#x).\n", hr); + + hr = IDirect3DDevice_QueryInterface(d3d_device1, &IID_IDirectDrawSurface, (void **)&surface); + ok(SUCCEEDED(hr), "Cannot get surface to the render target (hr = %#x).\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Clear uses the scene frame's background color. */ + hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 1.0f, 1.0f, 1.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr); + ret_color = IDirect3DRMFrame_GetSceneBackground(frame1); + ok(ret_color == 0xffffffff, "Expected scene color returned == 0xffffffff, got %#x.\n", ret_color); + hr = IDirect3DRMFrame_SetSceneBackgroundRGB(camera1, 0.0f, 1.0f, 0.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr); + ret_color = IDirect3DRMFrame_GetSceneBackground(camera1); + ok(ret_color == 0xff00ff00, "Expected scene color returned == 0xff00ff00, got %#x.\n", ret_color); + + hr = IDirect3DRMViewport_Clear(viewport1); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.0f, 0.0f, 1.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr); + ret_color = IDirect3DRMFrame_GetSceneBackground(frame1); + ok(ret_color == 0xff0000ff, "Expected scene color returned == 0xff00ff00, got %#x.\n", ret_color); + + hr = IDirect3DRMViewport_Configure(viewport1, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport_Clear(viewport1); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + d3d_draw_quad1(d3d_device1, d3d_viewport); + + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds); + ok(SUCCEEDED(hr), "Cannot get attached depth surface (hr = %x).\n", hr); + + hr = IDirect3DRMViewport_Configure(viewport1, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport_Clear(viewport1); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Fill the depth surface with a value lower than the quad's depth value. */ + clear_depth_surface(ds, 0x7fff); + + /* Depth test passes here */ + d3d_draw_quad1(d3d_device1, d3d_viewport); + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + /* Depth test fails here */ + ret_color = get_surface_color(surface, 500, 400); + ok(compare_color(ret_color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Check what happens if we release the depth surface that d3drm created, and clear the viewport */ + hr = IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds); + ok(SUCCEEDED(hr), "Cannot delete attached surface (hr = %#x).\n", hr); + d3drm_ds = (IDirectDrawSurface *)0xdeadbeef; + hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds); + ok(hr == DDERR_NOTFOUND, "Expected hr == DDERR_NOTFOUND, got %#x.\n", hr); + ok(d3drm_ds == NULL, "Expected NULL z-surface, got %p.\n", d3drm_ds); + + clear_depth_surface(ds, 0x7fff); + hr = IDirect3DRMViewport_Configure(viewport1, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport_Clear(viewport1); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + IDirectDrawSurface_Release(ds); + + d3d_draw_quad1(d3d_device1, d3d_viewport); + + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + ret_color = get_surface_color(surface, 500, 400); + ok(compare_color(ret_color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + IDirect3DViewport_Release(d3d_viewport); + IDirectDrawSurface_Release(surface); + IDirect3DDevice_Release(d3d_device1); + IDirect3DRMViewport_Release(viewport1); + IDirect3DRMFrame_Release(frame1); + IDirect3DRMFrame_Release(camera1); + IDirect3DRMDevice_Release(device1); + IDirect3DRM_Release(d3drm1); + IDirectDrawClipper_Release(clipper); + IDirectDraw_Release(ddraw); + DestroyWindow(window); +} + +static void draw_quad2(IDirect3DDevice2 *device, IDirect3DViewport *viewport) +{ + static D3DLVERTEX tquad[] = + { + {{-1.0f}, {-1.0f}, {0.0f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}}, + {{-1.0f}, { 1.0f}, {0.0f}, 0, {0xffbada55}, {0}, {0.0f}, {1.0f}}, + {{ 1.0f}, {-1.0f}, {1.0f}, 0, {0xffbada55}, {0}, {1.0f}, {0.0f}}, + {{ 1.0f}, { 1.0f}, {1.0f}, 0, {0xffbada55}, {0}, {1.0f}, {1.0f}}, + }; + static D3DMATRIX mat = + { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }; + IDirect3DViewport2 *viewport2; + HRESULT hr; + + hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, &mat); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_VIEW, &mat); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_PROJECTION, &mat); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + + hr = IDirect3DViewport_QueryInterface(viewport, &IID_IDirect3DViewport2, (void **)&viewport2); + ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport2 interface (hr = %#x).\n", hr); + hr = IDirect3DDevice2_SetCurrentViewport(device, viewport2); + ok(SUCCEEDED(hr), "Failed to activate the viewport, hr %#x.\n", hr); + IDirect3DViewport2_Release(viewport2); + + hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_TRUE); + ok(SUCCEEDED(hr), "Failed to enable z testing, hr %#x.\n", hr); + hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL); + ok(SUCCEEDED(hr), "Failed to set the z function, hr %#x.\n", hr); + + hr = IDirect3DDevice2_BeginScene(device); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, tquad, 4, 0); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + hr = IDirect3DDevice2_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); +} + +static void test_viewport_clear2(void) +{ + DDSCAPS caps = { DDSCAPS_ZBUFFER }; + IDirect3D2 *d3d2; + IDirectDraw *ddraw1; + IDirectDraw2 *ddraw2; + IDirectDrawClipper *clipper; + IDirect3DRM *d3drm1; + IDirect3DRM3 *d3drm3; + IDirect3DRMFrame3 *frame3, *camera3; + IDirect3DRMDevice3 *device3; + IDirect3DViewport *d3d_viewport; + IDirect3DRMViewport2 *viewport2; + IDirect3DDevice2 *d3d_device2; + IDirectDrawSurface *surface, *ds, *d3drm_ds; + HWND window; + GUID driver = IID_IDirect3DRGBDevice; + HRESULT hr; + D3DCOLOR ret_color; + RECT rc; + + window = CreateWindowA("static", "d3drm_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); + GetClientRect(window, &rc); + + hr = DirectDrawCreate(NULL, &ddraw1, NULL); + ok(SUCCEEDED(hr), "Cannot create IDirectDraw interface (hr = %#x).\n", hr); + + hr = IDirectDraw_SetCooperativeLevel(ddraw1, window, DDSCL_NORMAL); + ok(SUCCEEDED(hr), "Failed to set cooperative level (hr = %#x).\n", hr); + + hr = IDirectDraw_CreateClipper(ddraw1, 0, &clipper, NULL); + ok(SUCCEEDED(hr), "Cannot create clipper (hr = %#x).\n", hr); + + hr = IDirectDrawClipper_SetHWnd(clipper, 0, window); + ok(SUCCEEDED(hr), "Cannot set HWnd to Clipper (hr = %#x)\n", hr); + + hr = Direct3DRMCreate(&d3drm1); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRM interface (hr = %#x).\n", hr); + + hr = IDirect3DRM_QueryInterface(d3drm1, &IID_IDirect3DRM3, (void **)&d3drm3); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRM3 interface (hr = %#x).\n", hr); + + hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm3, clipper, &driver, rc.right, rc.bottom, &device3); + ok(hr == D3DRM_OK, "Cannot get IDirect3DRMDevice3 interface (hr = %#x)\n", hr); + + hr = IDirect3DRM3_CreateFrame(d3drm3, NULL, &frame3); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMFrame3 interface (hr = %#x)\n", hr); + hr = IDirect3DRM3_CreateFrame(d3drm3, frame3, &camera3); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMFrame3 interface (hr = %#x)\n", hr); + + hr = IDirect3DRM3_CreateViewport(d3drm3, device3, camera3, 0, 0, rc.right, + rc.bottom, &viewport2); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMViewport2 interface (hr = %#x)\n", hr); + + /* Fetch immediate mode device in order to access render target and test its color. */ + hr = IDirect3DRMDevice3_GetDirect3DDevice2(device3, &d3d_device2); + ok(SUCCEEDED(hr), "Cannot get IDirect3DDevice2 interface (hr = %#x).\n", hr); + + hr = IDirect3DDevice2_GetRenderTarget(d3d_device2, &surface); + ok(SUCCEEDED(hr), "Cannot get surface to the render target (hr = %#x).\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Clear uses the scene frame's background color. */ + hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 1.0f, 1.0f, 1.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr); + ret_color = IDirect3DRMFrame3_GetSceneBackground(frame3); + ok(ret_color == 0xffffffff, "Expected scene color returned == 0xffffffff, got %#x.\n", ret_color); + hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(camera3, 0.0f, 1.0f, 0.0f); + ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr); + ret_color = IDirect3DRMFrame3_GetSceneBackground(camera3); + ok(ret_color == 0xff00ff00, "Expected scene color returned == 0xff00ff00, got %#x.\n", ret_color); + + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirect3DRMViewport2_GetDirect3DViewport(viewport2, &d3d_viewport); + ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport interface (hr = %#x).\n", hr); + + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + + /* d3drm seems to be calling BeginScene when Clear is called. */ + hr = IDirect3DDevice2_BeginScene(d3d_device2); + todo_wine ok(hr == D3DERR_SCENE_IN_SCENE, "Expected hr == D3DERR_SCENE_IN_SCENE, got %#x.\n", hr); + hr = IDirect3DDevice2_EndScene(d3d_device2); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* We're using d3d to draw using IDirect3DDevice2 created from d3drm. */ + draw_quad2(d3d_device2, d3d_viewport); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Without calling Configure, Clear doesn't work. */ + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + todo_wine ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Fetch attached depth surface and see if viewport clears it if it's detached from the render target. */ + hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds); + ok(SUCCEEDED(hr), "Cannot get attached depth surface (hr = %x).\n", hr); + + clear_depth_surface(ds, 0x39); + draw_quad2(d3d_device2, d3d_viewport); + + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds); + ok(SUCCEEDED(hr), "Cannot delete attached surface (hr = %#x).\n", hr); + d3drm_ds = (IDirectDrawSurface *)0xdeadbeef; + hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds); + ok(hr == DDERR_NOTFOUND, "Expected hr == DDERR_NOTFOUND, got %#x.\n", hr); + ok(d3drm_ds == NULL, "Expected NULL z-surface, got %p.\n", d3drm_ds); + + clear_depth_surface(ds, 0x7fff); + + /* This version of Clear still clears the depth surface even if it's deleted from the render target. */ + hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + + hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); + ok(SUCCEEDED(hr), "Failed to attach depth buffer, hr %#x.\n", hr); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + draw_quad2(d3d_device2, d3d_viewport); + ret_color = get_surface_color(surface, 100, 200); + ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + ret_color = get_surface_color(surface, 500, 400); + todo_wine ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + + /* Clear with no flags */ + hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport2_Clear(viewport2, 0); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + todo_wine ok(compare_color(ret_color, 0x00bada55, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirect3DRMViewport2_Configure(viewport2, 0, 0, rc.right, rc.bottom); + todo_wine ok(SUCCEEDED(hr), "Cannot configure viewport (hr = %#x).\n", hr); + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + IDirect3DViewport_Release(d3d_viewport); + IDirectDrawSurface_Release(surface); + IDirectDrawSurface_Release(ds); + IDirect3DDevice2_Release(d3d_device2); + IDirect3DRMViewport2_Release(viewport2); + IDirect3DRMDevice3_Release(device3); + + /* Create device without depth surface attached */ + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw2); + ok(SUCCEEDED(hr), "Cannot get IDirectDraw2 interface (hr = %#x).\n", hr); + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D2, (void **)&d3d2); + ok(SUCCEEDED(hr), "Cannot get IDirect3D2 interface (hr = %x).\n", hr); + d3d_device2 = create_device2_without_ds(ddraw2, window); + if (!d3d_device2) + goto cleanup; + + hr = IDirect3DRM3_CreateDeviceFromD3D(d3drm3, d3d2, d3d_device2, &device3); + ok(SUCCEEDED(hr), "Failed to create IDirect3DRMDevice interface (hr = %#x)\n", hr); + hr = IDirect3DRM3_CreateViewport(d3drm3, device3, camera3, 0, 0, rc.right, + rc.bottom, &viewport2); + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMViewport2 interface (hr = %#x)\n", hr); + hr = IDirect3DDevice2_GetRenderTarget(d3d_device2, &surface); + ok(SUCCEEDED(hr), "Cannot get surface to the render target (hr = %#x).\n", hr); + + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + ret_color = get_surface_color(surface, 320, 240); + ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color); + + hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ZBUFFER); + ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr); + + IDirectDrawSurface_Release(surface); + IDirect3DRMViewport2_Release(viewport2); + IDirect3DRMDevice3_Release(device3); + IDirect3DDevice2_Release(d3d_device2); + +cleanup: + IDirect3DRMFrame3_Release(camera3); + IDirect3DRMFrame3_Release(frame3); + IDirect3DRM3_Release(d3drm3); + IDirect3DRM_Release(d3drm1); + IDirectDrawClipper_Release(clipper); + IDirect3D2_Release(d3d2); + IDirectDraw2_Release(ddraw2); + IDirectDraw_Release(ddraw1); + DestroyWindow(window); +} + START_TEST(d3drm) { test_MeshBuilder(); @@ -5869,4 +6566,6 @@ test_load_texture(); test_texture_qi(); test_viewport_qi(); + test_viewport_clear1(); + test_viewport_clear2(); }
8 years, 1 month
1
0
0
0
[akhaldi] 73252: [DINPUT] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 21:57:53 2016 New Revision: 73252 URL:
http://svn.reactos.org/svn/reactos?rev=73252&view=rev
Log: [DINPUT] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/directx/wine/dinput/device.c trunk/reactos/dll/directx/wine/dinput/dinput_main.c trunk/reactos/dll/directx/wine/dinput/effect_linuxinput.c trunk/reactos/dll/directx/wine/dinput/joystick.c trunk/reactos/dll/directx/wine/dinput/joystick_linux.c trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c trunk/reactos/dll/directx/wine/dinput/joystick_osx.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] Thu Nov 17 21:57:53 2016 @@ -69,6 +69,42 @@ TRACE("%s ",flags[i].name); TRACE("\n"); } +} + +static void _dump_ObjectDataFormat_flags(DWORD dwFlags) { + unsigned int i; + static const struct { + DWORD mask; + const char *name; + } flags[] = { +#define FE(x) { x, #x} + FE(DIDOI_FFACTUATOR), + FE(DIDOI_FFEFFECTTRIGGER), + FE(DIDOI_POLLED), + FE(DIDOI_GUIDISUSAGE) +#undef FE + }; + + if (!dwFlags) return; + + TRACE("Flags:"); + + /* First the flags */ + for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) { + if (flags[i].mask & dwFlags) + TRACE(" %s",flags[i].name); + } + + /* Now specific values */ +#define FE(x) case x: TRACE(" "#x); break + switch (dwFlags & DIDOI_ASPECTMASK) { + FE(DIDOI_ASPECTACCEL); + FE(DIDOI_ASPECTFORCE); + FE(DIDOI_ASPECTPOSITION); + FE(DIDOI_ASPECTVELOCITY); + } +#undef FE + } static void _dump_EnumObjects_flags(DWORD dwFlags) { @@ -215,6 +251,7 @@ TRACE(" * dwType: 0x%08x\n", df->rgodf[i].dwType); TRACE(" "); _dump_EnumObjects_flags(df->rgodf[i].dwType); TRACE("\n"); TRACE(" * dwFlags: 0x%08x\n", df->rgodf[i].dwFlags); + TRACE(" "); _dump_ObjectDataFormat_flags(df->rgodf[i].dwFlags); TRACE("\n"); } } @@ -431,16 +468,20 @@ debugstr_guid(asked_format->rgodf[j].pguid), _dump_dinput_GUID(asked_format->rgodf[j].pguid)); TRACE(" * Offset: %3d\n", asked_format->rgodf[j].dwOfs); - TRACE(" * dwType: %08x\n", asked_format->rgodf[j].dwType); + TRACE(" * dwType: 0x%08x\n", asked_format->rgodf[j].dwType); TRACE(" "); _dump_EnumObjects_flags(asked_format->rgodf[j].dwType); TRACE("\n"); + TRACE(" * dwFlags: 0x%08x\n", asked_format->rgodf[j].dwFlags); + TRACE(" "); _dump_ObjectDataFormat_flags(asked_format->rgodf[j].dwFlags); TRACE("\n"); TRACE(" - Wine (%d) :\n", i); TRACE(" * GUID: %s ('%s')\n", debugstr_guid(format->wine_df->rgodf[i].pguid), _dump_dinput_GUID(format->wine_df->rgodf[i].pguid)); TRACE(" * Offset: %3d\n", format->wine_df->rgodf[i].dwOfs); - TRACE(" * dwType: %08x\n", format->wine_df->rgodf[i].dwType); + TRACE(" * dwType: 0x%08x\n", format->wine_df->rgodf[i].dwType); TRACE(" "); _dump_EnumObjects_flags(format->wine_df->rgodf[i].dwType); TRACE("\n"); + TRACE(" * dwFlags: 0x%08x\n", format->wine_df->rgodf[i].dwFlags); + TRACE(" "); _dump_ObjectDataFormat_flags(format->wine_df->rgodf[i].dwFlags); TRACE("\n"); if (format->wine_df->rgodf[i].dwType & DIDFT_BUTTON) dt[index].size = sizeof(BYTE); @@ -469,8 +510,10 @@ debugstr_guid(asked_format->rgodf[j].pguid), _dump_dinput_GUID(asked_format->rgodf[j].pguid)); TRACE(" * Offset: %3d\n", asked_format->rgodf[j].dwOfs); - TRACE(" * dwType: %08x\n", asked_format->rgodf[j].dwType); + TRACE(" * dwType: 0x%08x\n", asked_format->rgodf[j].dwType); TRACE(" "); _dump_EnumObjects_flags(asked_format->rgodf[j].dwType); TRACE("\n"); + TRACE(" * dwFlags: 0x%08x\n", asked_format->rgodf[j].dwFlags); + TRACE(" "); _dump_ObjectDataFormat_flags(asked_format->rgodf[j].dwFlags); TRACE("\n"); if (asked_format->rgodf[j].dwType & DIDFT_BUTTON) dt[index].size = sizeof(BYTE); @@ -1537,7 +1580,10 @@ LPDIRECTINPUTEFFECT *ppdef, LPUNKNOWN pUnkOuter) { FIXME("(this=%p,%s,%p,%p,%p): stub!\n", iface, debugstr_guid(rguid), lpeff, ppdef, pUnkOuter); - return DI_OK; + + FIXME("not available in the generic implementation\n"); + *ppdef = NULL; + return DIERR_UNSUPPORTED; } HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIEFFECT lpeff, Modified: trunk/reactos/dll/directx/wine/dinput/dinput_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] Thu Nov 17 21:57:53 2016 @@ -162,15 +162,26 @@ return DirectInputCreateEx(hinst, dwVersion, &IID_IDirectInput7W, (LPVOID *)ppDI, punkOuter); } -static const char *_dump_DIDEVTYPE_value(DWORD dwDevType) -{ - switch (dwDevType) { - case 0: return "All devices"; - case DIDEVTYPE_MOUSE: return "DIDEVTYPE_MOUSE"; - case DIDEVTYPE_KEYBOARD: return "DIDEVTYPE_KEYBOARD"; - case DIDEVTYPE_JOYSTICK: return "DIDEVTYPE_JOYSTICK"; - case DIDEVTYPE_DEVICE: return "DIDEVTYPE_DEVICE"; - default: return "Unknown"; +static const char *_dump_DIDEVTYPE_value(DWORD dwDevType, DWORD dwVersion) +{ + if (dwVersion < 0x0800) { + switch (dwDevType) { + case 0: return "All devices"; + case DIDEVTYPE_MOUSE: return "DIDEVTYPE_MOUSE"; + case DIDEVTYPE_KEYBOARD: return "DIDEVTYPE_KEYBOARD"; + case DIDEVTYPE_JOYSTICK: return "DIDEVTYPE_JOYSTICK"; + case DIDEVTYPE_DEVICE: return "DIDEVTYPE_DEVICE"; + default: return "Unknown"; + } + } else { + switch (dwDevType) { + case DI8DEVCLASS_ALL: return "All devices"; + case DI8DEVCLASS_POINTER: return "DI8DEVCLASS_POINTER"; + case DI8DEVCLASS_KEYBOARD: return "DI8DEVCLASS_KEYBOARD"; + case DI8DEVCLASS_DEVICE: return "DI8DEVCLASS_DEVICE"; + case DI8DEVCLASS_GAMECTRL: return "DI8DEVCLASS_GAMECTRL"; + default: return "Unknown"; + } } } @@ -363,10 +374,11 @@ IDirectInputImpl *This = impl_from_IDirectInput7A(iface); DIDEVICEINSTANCEA devInstance; unsigned int i; - int j, r; - - TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", - This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), + int j; + HRESULT r; + + TRACE("(this=%p,0x%04x '%s',%p,%p,0x%04x)\n", + This, dwDevType, _dump_DIDEVTYPE_value(dwDevType, This->dwVersion), lpCallback, pvRef, dwFlags); _dump_EnumDevices_dwFlags(dwFlags); @@ -405,8 +417,8 @@ int j; HRESULT r; - TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", - This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), + TRACE("(this=%p,0x%04x '%s',%p,%p,0x%04x)\n", + This, dwDevType, _dump_DIDEVTYPE_value(dwDevType, This->dwVersion), lpCallback, pvRef, dwFlags); _dump_EnumDevices_dwFlags(dwFlags); Modified: trunk/reactos/dll/directx/wine/dinput/effect_linuxinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/ef…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/effect_linuxinput.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/effect_linuxinput.c [iso-8859-1] Thu Nov 17 21:57:53 2016 @@ -72,6 +72,93 @@ return (dir & 0xffff) * M_PI / 0x8000; } +static void ff_dump_effect(struct ff_effect *effect) +{ + const char *type = "(Unknown)", *length = "INFINITE"; + struct ff_envelope *env = NULL; + double angle; +#define FE(x) case x: type = #x; break + switch (effect->type) + { + FE(FF_RUMBLE); + FE(FF_PERIODIC); + FE(FF_CONSTANT); + FE(FF_SPRING); + FE(FF_FRICTION); + FE(FF_DAMPER); + FE(FF_INERTIA); + FE(FF_RAMP); + } +#undef FE + + /* rotate so 0 points right */ + angle = 360 - ff_effect_direction_to_rad(effect->direction + 0xc000) * 180 / M_PI; + + if (effect->replay.length) + length = wine_dbg_sprintf("%u ms", effect->replay.length); + + TRACE("type 0x%x %s, id %d, direction 0x%x (source angle %.2f), time length %s, start delay %u ms\n", + effect->type, type, effect->id, effect->direction, angle, length, effect->replay.delay); + if (effect->trigger.button || effect->trigger.interval) + TRACE(" -> trigger button %u, re-trigger interval %u ms\n", + effect->trigger.button, effect->trigger.interval); + + if (effect->type == FF_PERIODIC) + { + struct ff_periodic_effect *per = &effect->u.periodic; + const char *wave = "(Unknown)"; +#define FE(x) case x: wave = #x; break + switch (per->waveform) + { + FE(FF_SQUARE); + FE(FF_TRIANGLE); + FE(FF_SINE); + FE(FF_SAW_UP); + FE(FF_SAW_DOWN); + FE(FF_CUSTOM); + } +#undef FE + angle = ff_effect_direction_to_rad(per->phase) * 180 / M_PI; + TRACE(" -> waveform 0x%x %s, period %u ms, magnitude %d, offset %d, phase 0x%x (angle %.2f), custom len %d\n", + per->waveform, wave, per->period, per->magnitude, per->offset, per->phase, angle, per->custom_len); + env = &per->envelope; + } + else if (effect->type == FF_CONSTANT) + { + struct ff_constant_effect *cons = &effect->u.constant; + TRACE(" -> level %d\n", cons->level); + env = &cons->envelope; + } + else if (effect->type == FF_RAMP) + { + struct ff_ramp_effect *ramp = &effect->u.ramp; + TRACE(" -> start/end level %d/%d\n", ramp->start_level, ramp->end_level); + env = &ramp->envelope; + } + else if (effect->type == FF_RUMBLE) + { + struct ff_rumble_effect *rumble = &effect->u.rumble; + TRACE(" -> strong/weak magnitude %u/%u\n", rumble->strong_magnitude, rumble->weak_magnitude); + } + else if (effect->type == FF_SPRING || effect->type == FF_FRICTION || + effect->type == FF_DAMPER || effect->type == FF_INERTIA) + { + struct ff_condition_effect *cond = effect->u.condition; + int i; + for (i = 0; i < 2; i++) + { + /* format numbers here to make them align correctly */ + TRACE(" -> [%d] right/left saturation %5u/%5u, right/left coefficient %5d/%5d," + " deadband %5u, center %5d\n", i, cond[i].right_saturation, cond[i].left_saturation, + cond[i].right_coeff, cond[i].left_coeff, cond[i].deadband, cond[i].center); + } + } + + if (env) + TRACE(" -> envelope attack length(ms)/level %u/%u, fade length(ms)/level %u/%u\n", + env->attack_length, env->attack_level, env->fade_length, env->fade_level); +} + /****************************************************************************** * LinuxInputEffectImpl */ @@ -87,19 +174,37 @@ LPDIRECTINPUTEFFECT iface) { LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface); + int ret, old_effect_id; TRACE("(this=%p)\n", This); - - if (ioctl(*(This->fd), EVIOCSFF, &This->effect) == -1) { - if (errno == ENOMEM) { - return DIERR_DEVICEFULL; - } else { - FIXME("Could not upload effect. Assuming a disconnected device %d \"%s\".\n", *This->fd, strerror(errno)); - return DIERR_INPUTLOST; - } - } - - return DI_OK; + ff_dump_effect(&This->effect); + + old_effect_id = This->effect.id; + if (ioctl(*(This->fd), EVIOCSFF, &This->effect) != -1) + return DI_OK; + + /* Linux kernel < 3.14 has a bug that incorrectly assigns an effect ID even + * on error, restore it here if that is the case. */ + This->effect.id = old_effect_id; + + switch (errno) + { + case EINVAL: + ret = DIERR_INVALIDPARAM; + break; + case ENOSPC: + ret = DIERR_DEVICEFULL; + break; + case ENOMEM: + ret = DIERR_OUTOFMEMORY; + break; + default: + ret = DIERR_INPUTLOST; + break; + } + TRACE("Could not upload effect to fd %d, errno %d \"%s\", returning 0x%x.\n", + *This->fd, errno, strerror(errno), ret); + return ret; } static HRESULT WINAPI LinuxInputEffectImpl_Escape( @@ -130,6 +235,9 @@ LPDWORD pdwFlags) { TRACE("(this=%p,%p)\n", iface, pdwFlags); + + if (!pdwFlags) + return E_POINTER; /* linux sends the effect status through an event. * that event is trapped by our parent joystick driver @@ -195,8 +303,12 @@ } } - if (dwFlags & DIEP_DURATION) { - peff->dwDuration = (DWORD)This->effect.replay.length * 1000; + if (dwFlags & DIEP_DURATION) + { + if (!This->effect.replay.length) /* infinite for the linux driver */ + peff->dwDuration = INFINITE; + else + peff->dwDuration = (DWORD)This->effect.replay.length * 1000; } if (dwFlags & DIEP_ENVELOPE) { @@ -227,9 +339,8 @@ peff->dwSamplePeriod = 0; } - if (dwFlags & DIEP_STARTDELAY) { - peff->dwStartDelay = This->effect.replay.delay * 1000; - } + if ((dwFlags & DIEP_STARTDELAY) && peff->dwSize > sizeof(DIEFFECT_DX5)) + peff->dwStartDelay = This->effect.replay.delay * 1000; if (dwFlags & DIEP_TRIGGERBUTTON) { FIXME("LinuxInput button mapping needs redoing; for now, assuming we're using an actual joystick.\n"); @@ -409,52 +520,78 @@ /* one-axis effects must use cartesian coords */ return DIERR_INVALIDPARAM; } - } else { /* two axes */ - if (peff->dwFlags & DIEFF_CARTESIAN) { - LONG x, y; - if (This->first_axis_is_x) { - x = peff->rglDirection[0]; - y = peff->rglDirection[1]; - } else { - x = peff->rglDirection[1]; - y = peff->rglDirection[0]; - } - This->effect.direction = (int)((3 * M_PI / 2 - atan2(y, x)) * -0x7FFF / M_PI); - } else { - /* Polar and spherical are the same for 2 axes */ - /* Precision is important here, so we do double math with exact constants */ - This->effect.direction = (int)(((double)peff->rglDirection[0] - 90) / 35999) * 0x7FFF; - } - } + } + /* two axes */ + else + { + if (peff->dwFlags & DIEFF_CARTESIAN) + { + LONG x, y; + if (This->first_axis_is_x) + { + x = peff->rglDirection[0]; + y = peff->rglDirection[1]; + } + else + { + x = peff->rglDirection[1]; + y = peff->rglDirection[0]; + } + This->effect.direction = (unsigned int)((M_PI / 2 + atan2(y, x)) * 0x8000 / M_PI); + } + else + { + /* Polar and spherical are the same for 2 axes */ + /* Precision is important here, so we do double math with exact constants */ + This->effect.direction = (unsigned int)(((double)peff->rglDirection[0] / 18000) * 0x8000); + } + } } if (dwFlags & DIEP_DURATION) - This->effect.replay.length = peff->dwDuration / 1000; - - if (dwFlags & DIEP_ENVELOPE) { + { + if (peff->dwDuration == INFINITE) + This->effect.replay.length = 0; /* infinite for the linux driver */ + else if(peff->dwDuration > 1000) + This->effect.replay.length = peff->dwDuration / 1000; + else + This->effect.replay.length = 1; + } + + if (dwFlags & DIEP_ENVELOPE) + { struct ff_envelope* env; - if (This->effect.type == FF_CONSTANT) env = &This->effect.u.constant.envelope; - else if (This->effect.type == FF_PERIODIC) env = &This->effect.u.periodic.envelope; - else if (This->effect.type == FF_RAMP) env = &This->effect.u.ramp.envelope; - else env = NULL; - - if (peff->lpEnvelope == NULL) { - /* if this type had an envelope, reset it */ - if (env) { - env->attack_length = 0; - env->attack_level = 0; - env->fade_length = 0; - env->fade_level = 0; - } - } else { - /* did we get passed an envelope for a type that doesn't even have one? */ - if (!env) return DIERR_INVALIDPARAM; - /* copy the envelope */ - env->attack_length = peff->lpEnvelope->dwAttackTime / 1000; - env->attack_level = (peff->lpEnvelope->dwAttackLevel / 10) * 32; - env->fade_length = peff->lpEnvelope->dwFadeTime / 1000; - env->fade_level = (peff->lpEnvelope->dwFadeLevel / 10) * 32; - } + if (This->effect.type == FF_CONSTANT) + env = &This->effect.u.constant.envelope; + else if (This->effect.type == FF_PERIODIC) + env = &This->effect.u.periodic.envelope; + else if (This->effect.type == FF_RAMP) + env = &This->effect.u.ramp.envelope; + else + env = NULL; + + /* copy the envelope if it is present and the linux effect supports it */ + if (peff->lpEnvelope && env) + { + env->attack_length = peff->lpEnvelope->dwAttackTime / 1000; + env->attack_level = (peff->lpEnvelope->dwAttackLevel / 10) * 32; + env->fade_length = peff->lpEnvelope->dwFadeTime / 1000; + env->fade_level = (peff->lpEnvelope->dwFadeLevel / 10) * 32; + } + /* if the dinput envelope is NULL we will clear the linux envelope */ + else if (env) + { + env->attack_length = 0; + env->attack_level = 0; + env->fade_length = 0; + env->fade_level = 0; + } + else if(peff->lpEnvelope) + { + if(peff->lpEnvelope->dwAttackTime || peff->lpEnvelope->dwAttackLevel || + peff->lpEnvelope->dwFadeTime || peff->lpEnvelope->dwFadeLevel) + WARN("Ignoring dinput envelope not supported in the linux effect\n"); + } } /* Gain and Sample Period settings are not supported by the linux @@ -468,7 +605,8 @@ TRACE("Sample period requested but no sample period functionality present.\n"); if (dwFlags & DIEP_STARTDELAY) - This->effect.replay.delay = peff->dwStartDelay / 1000; + if ((dwFlags & DIEP_STARTDELAY) && peff->dwSize > sizeof(DIEFFECT_DX5)) + This->effect.replay.delay = peff->dwStartDelay / 1000; if (dwFlags & DIEP_TRIGGERBUTTON) { if (peff->dwTriggerButton != -1) { @@ -481,19 +619,30 @@ if (dwFlags & DIEP_TRIGGERREPEATINTERVAL) This->effect.trigger.interval = peff->dwTriggerRepeatInterval / 1000; - if (dwFlags & DIEP_TYPESPECIFICPARAMS) { - if (!(peff->lpvTypeSpecificParams)) - return DIERR_INCOMPLETEEFFECT; - if (type == DIEFT_PERIODIC) { - LPCDIPERIODIC tsp; + if (dwFlags & DIEP_TYPESPECIFICPARAMS) + { + if (!(peff->lpvTypeSpecificParams)) + return DIERR_INCOMPLETEEFFECT; + + if (type == DIEFT_PERIODIC) + { + DIPERIODIC *tsp; if (peff->cbTypeSpecificParams != sizeof(DIPERIODIC)) return DIERR_INVALIDPARAM; tsp = peff->lpvTypeSpecificParams; - This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32; - This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32; - This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */ - This->effect.u.periodic.period = tsp->dwPeriod / 1000; - } else if (type == DIEFT_CONSTANTFORCE) { + + This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32; + This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32; + /* phase ranges from 0 - 35999 in dinput and 0 - 65535 on linux */ + This->effect.u.periodic.phase = (tsp->dwPhase / 36) * 65; + /* dinput uses microseconds, linux uses miliseconds */ + if (tsp->dwPeriod <= 1000) + This->effect.u.periodic.period = 1; + else + This->effect.u.periodic.period = tsp->dwPeriod / 1000; + } + else if (type == DIEFT_CONSTANTFORCE) + { LPCDICONSTANTFORCE tsp; if (peff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) return DIERR_INVALIDPARAM; @@ -506,43 +655,49 @@ tsp = peff->lpvTypeSpecificParams; This->effect.u.ramp.start_level = (tsp->lStart / 10) * 32; This->effect.u.ramp.end_level = (tsp->lEnd / 10) * 32; - } else if (type == DIEFT_CONDITION) { - LPCDICONDITION tsp = peff->lpvTypeSpecificParams; - if (peff->cbTypeSpecificParams == sizeof(DICONDITION)) { - /* One condition block. This needs to be rotated to direction, - * and expanded to separate x and y conditions. */ - int i; - double factor[2], angle; - /* rotate so 0 points right */ - angle = ff_effect_direction_to_rad(This->effect.direction + 0xc000); - factor[0] = sin(angle); - factor[1] = -cos(angle); - for (i = 0; i < 2; ++i) { - This->effect.u.condition[i].center = (int)(factor[i] * (tsp->lOffset / 10) * 32); - This->effect.u.condition[i].right_coeff = (int)(factor[i] * (tsp->lPositiveCoefficient / 10) * 32); - This->effect.u.condition[i].left_coeff = (int)(factor[i] * (tsp->lNegativeCoefficient / 10) * 32); - This->effect.u.condition[i].right_saturation = (int)(factor[i] * (tsp->dwPositiveSaturation / 10) * 32); - This->effect.u.condition[i].left_saturation = (int)(factor[i] * (tsp->dwNegativeSaturation / 10) * 32); - This->effect.u.condition[i].deadband = (int)(factor[i] * (tsp->lDeadBand / 10) * 32); - } - } else if (peff->cbTypeSpecificParams == 2 * sizeof(DICONDITION)) { - /* Two condition blocks. Direct parameter copy. */ - int i; - for (i = 0; i < 2; ++i) { - This->effect.u.condition[i].center = (tsp[i].lOffset / 10) * 32; - This->effect.u.condition[i].right_coeff = (tsp[i].lPositiveCoefficient / 10) * 32; - This->effect.u.condition[i].left_coeff = (tsp[i].lNegativeCoefficient / 10) * 32; - This->effect.u.condition[i].right_saturation = (tsp[i].dwPositiveSaturation / 10) * 32; - This->effect.u.condition[i].left_saturation = (tsp[i].dwNegativeSaturation / 10) * 32; - This->effect.u.condition[i].deadband = (tsp[i].lDeadBand / 10) * 32; - } - } else { + } + else if (type == DIEFT_CONDITION) + { + DICONDITION *tsp = peff->lpvTypeSpecificParams; + struct ff_condition_effect *cond = This->effect.u.condition; + int i, j, sources; + double factor[2]; + + if (peff->cbTypeSpecificParams == sizeof(DICONDITION)) + { + /* One condition block. This needs to be rotated to direction, + * and expanded to separate x and y conditions. Ensures 0 points right */ + double angle = ff_effect_direction_to_rad(This->effect.direction + 0xc000); + factor[0] = sin(angle); + factor[1] = -cos(angle); + sources = 1; + } + else if (peff->cbTypeSpecificParams == 2 * sizeof(DICONDITION)) + { + /* Direct parameter copy without changes */ + factor[0] = factor[1] = 1; + sources = 2; + } + else return DIERR_INVALIDPARAM; - } - } else { - FIXME("Custom force types are not supported\n"); - return DIERR_INVALIDPARAM; - } + + for (i = j = 0; i < 2; ++i) + { + cond[i].center = (int)(factor[i] * (tsp[j].lOffset / 10) * 32); + cond[i].right_coeff = (int)(factor[i] * (tsp[j].lPositiveCoefficient / 10) * 32); + cond[i].left_coeff = (int)(factor[i] * (tsp[j].lNegativeCoefficient / 10) * 32); + cond[i].right_saturation = (int)(factor[i] * (tsp[j].dwPositiveSaturation / 10) * 65); + cond[i].left_saturation = (int)(factor[i] * (tsp[j].dwNegativeSaturation / 10) * 65); + cond[i].deadband = (int)(factor[i] * (tsp[j].lDeadBand / 10) * 32); + if (sources == 2) + j++; + } + } + else + { + FIXME("Custom force types are not supported\n"); + return DIERR_INVALIDPARAM; + } } if (!(dwFlags & DIEP_NODOWNLOAD)) 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] Thu Nov 17 21:57:53 2016 @@ -213,10 +213,14 @@ _dump_DIRAMPFORCE(eff->lpvTypeSpecificParams); } } else if (type == DIEFT_CONDITION) { - if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) { + if (eff->cbTypeSpecificParams == sizeof(DICONDITION)) { + _dump_DICONDITION(eff->lpvTypeSpecificParams); + } else if (eff->cbTypeSpecificParams == 2 * sizeof(DICONDITION)) { + DICONDITION *condition = eff->lpvTypeSpecificParams; + _dump_DICONDITION(&condition[0]); + _dump_DICONDITION(&condition[1]); + } else { WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n"); - } else { - _dump_DICONDITION(eff->lpvTypeSpecificParams); } } else if (type == DIEFT_CUSTOMFORCE) { if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) { @@ -289,6 +293,11 @@ case (DWORD_PTR)DIPROP_RANGE: { LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; if (ph->dwHow == DIPH_DEVICE) { + + /* Many games poll the joystick immediately after setting the range + * for calibration purposes, so the old values need to be remapped + * to the new range before it does so */ + TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { @@ -322,8 +331,6 @@ TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj); if (obj >= 0) { - /*ePSXe polls the joystick immediately after setting the range for calibration purposes, so the old values need to be remapped to the new range before it does so*/ - remap_props.lDevMin = This->props[obj].lMin; remap_props.lDevMax = This->props[obj].lMax; @@ -333,7 +340,7 @@ remap_props.lMin = pr->lMin; remap_props.lMax = pr->lMax; - switch (ph->dwObj) { + switch (This->base.data_format.wine_df->rgodf[obj].dwOfs) { case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break; case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break; case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break; @@ -404,7 +411,7 @@ void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps) { int type = GET_DIDEVICE_TYPE(lpDIDevCaps->dwDevType); - const char *str; + const char *str, *hid = ""; TRACE("dwSize: %d\n", lpDIDevCaps->dwSize); TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags); switch(type) @@ -414,7 +421,6 @@ DEBUG_TYPE(DIDEVTYPE_MOUSE); DEBUG_TYPE(DIDEVTYPE_KEYBOARD); DEBUG_TYPE(DIDEVTYPE_JOYSTICK); - DEBUG_TYPE(DIDEVTYPE_HID); /* Direct X >= 8 definitions */ DEBUG_TYPE(DI8DEVTYPE_DEVICE); DEBUG_TYPE(DI8DEVTYPE_MOUSE); @@ -431,7 +437,10 @@ default: str = "UNKNOWN"; } - TRACE("dwDevType: %08x %s\n", lpDIDevCaps->dwDevType, str); + if (lpDIDevCaps->dwDevType & DIDEVTYPE_HID) + hid = " (HID)"; + + TRACE("dwDevType: %08x %s%s\n", lpDIDevCaps->dwDevType, str, hid); TRACE("dwAxes: %d\n", lpDIDevCaps->dwAxes); TRACE("dwButtons: %d\n", lpDIDevCaps->dwButtons); TRACE("dwPOVs: %d\n", lpDIDevCaps->dwPOVs); @@ -493,9 +502,10 @@ res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); if (res != DI_OK) return res; - if (pdidoi->dwType & DIDFT_AXIS) + if (pdidoi->dwType & DIDFT_AXIS) { sprintfW(pdidoi->tszName, axisW, DIDFT_GETINSTANCE(pdidoi->dwType)); - else if (pdidoi->dwType & DIDFT_POV) + pdidoi->dwFlags |= DIDOI_ASPECTPOSITION; + } else if (pdidoi->dwType & DIDFT_POV) sprintfW(pdidoi->tszName, povW, DIDFT_GETINSTANCE(pdidoi->dwType)); else if (pdidoi->dwType & DIDFT_BUTTON) sprintfW(pdidoi->tszName, buttonW, DIDFT_GETINSTANCE(pdidoi->dwType)); @@ -575,6 +585,7 @@ } break; } + case (DWORD_PTR) DIPROP_PRODUCTNAME: case (DWORD_PTR) DIPROP_INSTANCENAME: { DIPROPSTRING *ps = (DIPROPSTRING*) pdiph; DIDEVICEINSTANCEW didev; @@ -582,7 +593,10 @@ didev.dwSize = sizeof(didev); IDirectInputDevice_GetDeviceInfo(iface, &didev); - lstrcpynW(ps->wsz, didev.tszInstanceName, MAX_PATH); + if (LOWORD(rguid) == (DWORD_PTR) DIPROP_PRODUCTNAME) + lstrcpynW(ps->wsz, didev.tszProductName, MAX_PATH); + else + lstrcpynW(ps->wsz, didev.tszInstanceName, MAX_PATH); return DI_OK; } 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] Thu Nov 17 21:57:53 2016 @@ -63,7 +63,7 @@ BYTE button_count; int *dev_axes_map; - WORD vendor_id, product_id; + WORD vendor_id, product_id, bus_type; }; typedef struct JoystickImpl JoystickImpl; @@ -122,6 +122,29 @@ static void joy_polldev(LPDIRECTINPUTDEVICE8A iface); +#define SYS_PATH_FORMAT "/sys/class/input/js%d/device/id/%s" +static BOOL read_sys_id_variable(int index, const char *property, WORD *value) +{ + char sys_path[sizeof(SYS_PATH_FORMAT) + 16], id_str[5]; + int sys_fd; + BOOL ret = FALSE; + + sprintf(sys_path, SYS_PATH_FORMAT, index, property); + if ((sys_fd = open(sys_path, O_RDONLY)) != -1) + { + if (read(sys_fd, id_str, 4) == 4) + { + id_str[4] = '\0'; + *value = strtol(id_str, NULL, 16); + ret = TRUE; + } + + close(sys_fd); + } + return ret; +} +#undef SYS_PATH_FORMAT + static INT find_joystick_devices(void) { INT i; @@ -131,16 +154,15 @@ joystick_devices_count = 0; for (i = 0; i < MAX_JOYSTICKS; i++) { - int fd, sys_fd; + int fd; struct JoyDev joydev, *new_joydevs; BYTE axes_map[ABS_MAX + 1]; - char sys_path[sizeof("/sys/class/input/js/device/id/product") + 10], id_str[5]; snprintf(joydev.device, sizeof(joydev.device), "%s%d", JOYDEV_NEW, i); - if ((fd = open(joydev.device, O_RDONLY)) < 0) + if ((fd = open(joydev.device, O_RDONLY)) == -1) { snprintf(joydev.device, sizeof(joydev.device), "%s%d", JOYDEV_OLD, i); - if ((fd = open(joydev.device, O_RDONLY)) < 0) continue; + if ((fd = open(joydev.device, O_RDONLY)) == -1) continue; } strcpy(joydev.name, "Wine Joystick"); @@ -205,31 +227,9 @@ joydev.vendor_id = 0; joydev.product_id = 0; - sprintf(sys_path, "/sys/class/input/js%d/device/id/vendor", i); - sys_fd = open(sys_path, O_RDONLY); - if (sys_fd > 0) - { - if (read(sys_fd, id_str, 4) == 4) - { - id_str[4] = '\0'; - joydev.vendor_id = strtol(id_str, NULL, 16); - } - - close(sys_fd); - } - - sprintf(sys_path, "/sys/class/input/js%d/device/id/product", i); - sys_fd = open(sys_path, O_RDONLY); - if (sys_fd > 0) - { - if (read(sys_fd, id_str, 4) == 4) - { - id_str[4] = '\0'; - joydev.product_id = strtol(id_str, NULL, 16); - } - - close(sys_fd); - } + read_sys_id_variable(i, "vendor", &joydev.vendor_id); + read_sys_id_variable(i, "product", &joydev.product_id); + read_sys_id_variable(i, "bustype", &joydev.bus_type); if (joydev.vendor_id == 0 || joydev.product_id == 0) { @@ -261,7 +261,7 @@ return joystick_devices_count; } -static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { DWORD dwSize = lpddi->dwSize; @@ -278,33 +278,45 @@ 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 = joystick_devices[id].guid_product; - /* 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); + + /* Assume the joystick as HID if it is attached to USB bus and has a valid VID/PID */ + if (joystick_devices[id].bus_type == BUS_USB && + joystick_devices[id].vendor_id && joystick_devices[id].product_id) + { + lpddi->dwDevType |= DIDEVTYPE_HID; + lpddi->wUsagePage = 0x01; /* Desktop */ + if (lpddi->dwDevType == DI8DEVTYPE_JOYSTICK || lpddi->dwDevType == DIDEVTYPE_JOYSTICK) + lpddi->wUsage = 0x04; /* Joystick */ + else + lpddi->wUsage = 0x05; /* Game Pad */ + } 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 void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +{ + DIDEVICEINSTANCEW lpddiW; + DWORD dwSize = lpddi->dwSize; + + lpddiW.dwSize = sizeof(lpddiW); + fill_joystick_dideviceinstanceW(&lpddiW, version, id); + + TRACE("%d %p\n", dwSize, lpddi); + memset(lpddi, 0, dwSize); + + /* Convert W->A */ + lpddi->dwSize = dwSize; + lpddi->guidInstance = lpddiW.guidInstance; + lpddi->guidProduct = lpddiW.guidProduct; + lpddi->dwDevType = lpddiW.dwDevType; + strcpy(lpddi->tszInstanceName, joystick_devices[id].name); + strcpy(lpddi->tszProductName, joystick_devices[id].name); + lpddi->guidFFDriver = lpddiW.guidFFDriver; + lpddi->wUsagePage = lpddiW.wUsagePage; + lpddi->wUsage = lpddiW.wUsage; } static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) @@ -322,14 +334,14 @@ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { /* check whether we have a joystick */ - if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) - { - WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].name, strerror(errno)); + if ((fd = open(joystick_devices[id].device, O_RDONLY)) == -1) + { + WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); return S_FALSE; } fill_joystick_dideviceinstanceA( lpddi, version, id ); close(fd); - TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, lpddi->tszProductName); + TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, joystick_devices[id].name); return S_OK; } @@ -351,9 +363,9 @@ ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { /* check whether we have a joystick */ - if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) - { - WARN("open(%s,O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); + if ((fd = open(joystick_devices[id].device, O_RDONLY)) == -1) + { + WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); return S_FALSE; } fill_joystick_dideviceinstanceW( lpddi, version, id ); @@ -373,6 +385,7 @@ HRESULT hr; LPDIDATAFORMAT df = NULL; int idx = 0; + DIDEVICEINSTANCEW ddi; TRACE("%s %p %p %hu\n", debugstr_guid(rguid), dinput, pdev, index); @@ -463,10 +476,11 @@ newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps); newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED; - if (newDevice->generic.base.dinput->dwVersion >= 0x0800) - newDevice->generic.devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - newDevice->generic.devcaps.dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + + ddi.dwSize = sizeof(ddi); + fill_joystick_dideviceinstanceW(&ddi, newDevice->generic.base.dinput->dwVersion, index); + newDevice->generic.devcaps.dwDevType = ddi.dwDevType; + newDevice->generic.devcaps.dwFFSamplePeriod = 0; newDevice->generic.devcaps.dwFFMinTimeResolution = 0; newDevice->generic.devcaps.dwFirmwareRevision = 0; @@ -625,6 +639,16 @@ switch (LOWORD(rguid)) { + case (DWORD_PTR) DIPROP_VIDPID: + { + LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; + + if (!This->joydev->product_id || !This->joydev->vendor_id) + return DIERR_UNSUPPORTED; + pd->dwData = MAKELONG(This->joydev->vendor_id, This->joydev->product_id); + TRACE("DIPROP_VIDPID(%08x)\n", pd->dwData); + break; + } case (DWORD_PTR) DIPROP_JOYSTICKID: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] Thu Nov 17 21:57:53 2016 @@ -91,7 +91,7 @@ /* data returned by the EVIOCGABS() ioctl */ struct wine_input_absinfo axes[ABS_MAX]; - WORD vendor_id, product_id; + WORD vendor_id, product_id, bus_type; }; struct JoystickImpl @@ -296,6 +296,7 @@ { joydev.vendor_id = device_id.vendor; joydev.product_id = device_id.product; + joydev.bus_type = device_id.bustype; /* Concatenate product_id with vendor_id to mimic Windows behaviour */ joydev.guid_product = DInput_Wine_Joystick_Constant_Part_GUID; @@ -320,7 +321,7 @@ } } -static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { DWORD dwSize = lpddi->dwSize; @@ -337,29 +338,43 @@ else lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); - strcpy(lpddi->tszInstanceName, joydevs[id].name); - strcpy(lpddi->tszProductName, joydevs[id].name); -} - -static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) -{ + /* Assume the joystick as HID if it is attached to USB bus and has a valid VID/PID */ + if (joydevs[id].bus_type == BUS_USB && + joydevs[id].vendor_id && joydevs[id].product_id) + { + lpddi->dwDevType |= DIDEVTYPE_HID; + lpddi->wUsagePage = 0x01; /* Desktop */ + if (lpddi->dwDevType == DI8DEVTYPE_JOYSTICK || lpddi->dwDevType == DIDEVTYPE_JOYSTICK) + lpddi->wUsage = 0x04; /* Joystick */ + else + lpddi->wUsage = 0x05; /* Game Pad */ + } + + MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszInstanceName, MAX_PATH); + MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszProductName, MAX_PATH); +} + +static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +{ + DIDEVICEINSTANCEW lpddiW; DWORD dwSize = lpddi->dwSize; + + lpddiW.dwSize = sizeof(lpddiW); + fill_joystick_dideviceinstanceW(&lpddiW, version, id); TRACE("%d %p\n", dwSize, lpddi); memset(lpddi, 0, dwSize); - lpddi->dwSize = dwSize; - lpddi->guidInstance = joydevs[id].guid; - lpddi->guidProduct = joydevs[id].guid_product; - lpddi->guidFFDriver = GUID_NULL; - - if (version >= 0x0800) - lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); - - MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszInstanceName, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszProductName, MAX_PATH); + /* Convert W->A */ + lpddi->dwSize = dwSize; + lpddi->guidInstance = lpddiW.guidInstance; + lpddi->guidProduct = lpddiW.guidProduct; + lpddi->dwDevType = lpddiW.dwDevType; + strcpy(lpddi->tszInstanceName, joydevs[id].name); + strcpy(lpddi->tszProductName, joydevs[id].name); + lpddi->guidFFDriver = lpddiW.guidFFDriver; + lpddi->wUsagePage = lpddiW.wUsagePage; + lpddi->wUsage = lpddiW.wUsage; } static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) @@ -418,6 +433,7 @@ LPDIDATAFORMAT df = NULL; int i, idx = 0; int default_axis_map[WINE_JOYSTICK_MAX_AXES + WINE_JOYSTICK_MAX_POVS*2]; + DIDEVICEINSTANCEW ddi; newDevice = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(JoystickImpl)); if (!newDevice) return NULL; @@ -537,10 +553,10 @@ /* Fill the caps */ newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps); newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED; - if (newDevice->generic.base.dinput->dwVersion >= 0x0800) - newDevice->generic.devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - newDevice->generic.devcaps.dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + + ddi.dwSize = sizeof(ddi); + fill_joystick_dideviceinstanceW(&ddi, newDevice->generic.base.dinput->dwVersion, index); + newDevice->generic.devcaps.dwDevType = ddi.dwDevType; if (newDevice->joydev->has_ff) newDevice->generic.devcaps.dwFlags |= DIDC_FORCEFEEDBACK; @@ -1015,10 +1031,16 @@ JoystickImpl* This = impl_from_IDirectInputDevice8W(iface); TRACE("(this=%p,%p,%p,%p,%p)\n", This, rguid, lpeff, ppdef, pUnkOuter); + *ppdef = NULL; + if (!This->joydev->has_ff) + { + TRACE("No force feedback support\n"); + return DIERR_UNSUPPORTED; + } + #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION - TRACE("not available (compiled w/o ff support)\n"); - *ppdef = NULL; - return DI_OK; + TRACE("not available (compiled w/o force feedback support)\n"); + return DIERR_UNSUPPORTED; #else if (!(new_effect = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_effect)))) Modified: trunk/reactos/dll/directx/wine/dinput/joystick_osx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/joystick_osx.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/joystick_osx.c [iso-8859-1] Thu Nov 17 21:57:53 2016 @@ -1398,7 +1398,7 @@ if(!This->ff){ TRACE("No force feedback support\n"); *out = NULL; - return S_OK; + return DIERR_UNSUPPORTED; } if(outer) 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] Thu Nov 17 21:57:53 2016 @@ -30,7 +30,7 @@ reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.9.4 reactos/dll/directx/wine/devenum # Synced to WineStaging-1.9.16 -reactos/dll/directx/wine/dinput # Synced to WineStaging-1.9.16 +reactos/dll/directx/wine/dinput # Synced to WineStaging-1.9.23 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.9.11 reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.16 reactos/dll/directx/wine/dplay # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73251: [PSDK] Add missing DI_WRITEPROTECT and DIPROP_PRODUCTNAME.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 21:56:53 2016 New Revision: 73251 URL:
http://svn.reactos.org/svn/reactos?rev=73251&view=rev
Log: [PSDK] Add missing DI_WRITEPROTECT and DIPROP_PRODUCTNAME. Modified: trunk/reactos/sdk/include/psdk/dinput.h Modified: trunk/reactos/sdk/include/psdk/dinput.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/dinput.h?…
============================================================================== --- trunk/reactos/sdk/include/psdk/dinput.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/dinput.h [iso-8859-1] Thu Nov 17 21:56:53 2016 @@ -136,6 +136,7 @@ #define DI_TRUNCATED ((HRESULT)0x00000008) #define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000B) #define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000C) +#define DI_WRITEPROTECT ((HRESULT)0x00000013) #define DIERR_OLDDIRECTINPUTVERSION \ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION) @@ -907,6 +908,7 @@ #define DIPROP_GUIDANDPATH MAKEDIPROP(12) #define DIPROP_INSTANCENAME MAKEDIPROP(13) +#define DIPROP_PRODUCTNAME MAKEDIPROP(14) #define DIPROP_JOYSTICKID MAKEDIPROP(15) #define DIPROP_KEYNAME MAKEDIPROP(20) #define DIPROP_VIDPID MAKEDIPROP(24)
8 years, 1 month
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
32
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
Results per page:
10
25
50
100
200