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
April 2014
----- 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
492 discussions
Start a n
N
ew thread
[akhaldi] 62828: [DPLAYX] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Apr 20 00:08:13 2014 New Revision: 62828 URL:
http://svn.reactos.org/svn/reactos?rev=62828&view=rev
Log: [DPLAYX] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/directx/wine/dplayx/dplay.c trunk/reactos/dll/directx/wine/dplayx/dplay_global.h trunk/reactos/dll/directx/wine/dplayx/dplaysp.c trunk/reactos/dll/directx/wine/dplayx/dplayx.idl trunk/reactos/dll/directx/wine/dplayx/dplayx_global.c trunk/reactos/dll/directx/wine/dplayx/lobbysp.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dplayx/dplay.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/dp…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/dplay.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/dplay.c [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -149,9 +149,7 @@ This->dp2->spData.lpCB->dwVersion = DPSP_MAJORVERSION; /* This is the pointer to the service provider */ - if( FAILED( DPSP_CreateInterface( &IID_IDirectPlaySP, - (LPVOID*)&This->dp2->spData.lpISP, This ) ) - ) + if ( FAILED( dplaysp_create( &IID_IDirectPlaySP, (void**)&This->dp2->spData.lpISP, This ) ) ) { /* FIXME: Memory leak */ return FALSE; @@ -163,8 +161,7 @@ sizeof( *This->dp2->dplspData.lpCB ) ); This->dp2->dplspData.lpCB->dwSize = sizeof( *This->dp2->dplspData.lpCB ); - if( FAILED( DPLSP_CreateInterface( &IID_IDPLobbySP, - (LPVOID*)&This->dp2->dplspData.lpISP, This ) ) + if( FAILED( dplobbysp_create( &IID_IDPLobbySP, (void**)&This->dp2->dplspData.lpISP, This ) ) ) { /* FIXME: Memory leak */ @@ -303,28 +300,17 @@ case DPMSGCMD_GETNAMETABLEREPLY: case DPMSGCMD_NEWPLAYERIDREPLY: -#if 0 - if( wCommandId == DPMSGCMD_NEWPLAYERIDREPLY ) - DebugBreak(); -#endif DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); break; -#if 1 case DPMSGCMD_JUSTENVELOPE: TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08x\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] ); NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 ); DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); -#endif case DPMSGCMD_FORWARDADDPLAYER: -#if 0 - DebugBreak(); -#endif -#if 1 TRACE( "Sending message to self to get my addr\n" ); DP_MSG_ToSelf( This, 1 ); /* This is a hack right now */ -#endif break; case DPMSGCMD_FORWARDADDPLAYERNACK: @@ -1650,7 +1636,7 @@ } #if 1 - if( This->dp2->bHostInterface == FALSE ) + if( !This->dp2->bHostInterface ) { /* Let the name server know about the creation of this player */ /* FIXME: Is this only to be done for the creation of a server player or @@ -4624,7 +4610,7 @@ FILETIME filetime; (i == 0) ? (searchSubKey = spSubKey ) : (searchSubKey = lpSubKey ); - *lpbIsDpSp = (i == 0) ? TRUE : FALSE; + *lpbIsDpSp = (i == 0); /* Need to loop over the service providers in the registry */ Modified: trunk/reactos/dll/directx/wine/dplayx/dplay_global.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/dp…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/dplay_global.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/dplay_global.h [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -200,7 +200,7 @@ extern HRESULT dplay_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; extern HRESULT dplobby_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; -extern HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; -extern HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; +extern HRESULT dplaysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; +extern HRESULT dplobbysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; #endif /* __WINE_DPLAY_GLOBAL_INCLUDED */ Modified: trunk/reactos/dll/directx/wine/dplayx/dplaysp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/dp…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/dplaysp.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/dplaysp.c [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -22,46 +22,16 @@ /* FIXME: Need to add interface locking inside procedures */ -/* Prototypes */ -static BOOL DPSP_CreateIUnknown( LPVOID lpSP ); -static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ); -static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ); -static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ); - -/* Predefine the interface */ -typedef struct IDirectPlaySPImpl IDirectPlaySPImpl; - -typedef struct tagDirectPlaySPIUnknownData -{ - LONG ulObjRef; - CRITICAL_SECTION DPSP_lock; -} DirectPlaySPIUnknownData; - -typedef struct tagDirectPlaySPData -{ - LPVOID lpSpRemoteData; - DWORD dwSpRemoteDataSize; /* Size of data pointed to by lpSpRemoteData */ - - LPVOID lpSpLocalData; - DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */ - +typedef struct IDirectPlaySPImpl +{ + IDirectPlaySP IDirectPlaySP_iface; + LONG ref; + void *remote_data; + DWORD remote_data_size; + void *local_data; + DWORD local_data_size; IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */ - -} DirectPlaySPData; - -#define DPSP_IMPL_FIELDS \ - LONG ulInterfaceRef; \ - DirectPlaySPIUnknownData* unk; \ - DirectPlaySPData* sp; - -struct IDirectPlaySPImpl -{ - const IDirectPlaySPVtbl *lpVtbl; - DPSP_IMPL_FIELDS -}; - -/* Forward declaration of virtual tables */ -static const IDirectPlaySPVtbl directPlaySPVT; +} IDirectPlaySPImpl; /* This structure is passed to the DP object for safe keeping */ typedef struct tagDP_SPPLAYERDATA @@ -73,202 +43,60 @@ DWORD dwPlayerRemoteDataSize; } DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA; -/* Create the SP interface */ -HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) -{ - TRACE( " for %s\n", debugstr_guid( riid ) ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( IDirectPlaySPImpl ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - if( IsEqualGUID( &IID_IDirectPlaySP, riid ) ) - { - IDirectPlaySPImpl *This = *ppvObj; - This->lpVtbl = &directPlaySPVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - /* Initialize it */ - if( DPSP_CreateIUnknown( *ppvObj ) && - DPSP_CreateDirectPlaySP( *ppvObj, dp ) - ) - { - IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); + +static inline IDirectPlaySPImpl *impl_from_IDirectPlaySP( IDirectPlaySP *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlaySPImpl, IDirectPlaySP_iface ); +} + +static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, REFIID riid, + void **ppv ) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid( riid ), ppv ); + + if ( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDirectPlaySP, riid ) ) + { + *ppv = iface; + IDirectPlaySP_AddRef( iface ); return S_OK; } - /* Initialize failed, destroy it */ - DPSP_DestroyDirectPlaySP( *ppvObj ); - DPSP_DestroyIUnknown( *ppvObj ); - - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return DPERR_NOMEMORY; -} - -static BOOL DPSP_CreateIUnknown( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DPSP_lock ); - This->unk->DPSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlaySPImpl*->DirectPlaySPIUnknownData*->DPSP_lock"); - - return TRUE; -} - -static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->unk->DPSP_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DPSP_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - - -static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->sp = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->sp) ) ); - - if ( This->sp == NULL ) - { - return FALSE; - } - - This->sp->dplay = dp; - - return TRUE; -} - -static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - HeapFree( GetProcessHeap(), 0, This->sp->lpSpRemoteData ); - HeapFree( GetProcessHeap(), 0, This->sp->lpSpLocalData ); - - /* FIXME: Need to delete player queue */ - - HeapFree( GetProcessHeap(), 0, This->sp ); - return TRUE; -} - -/* Interface implementation */ - -static HRESULT WINAPI DPSP_QueryInterface -( LPDIRECTPLAYSP iface, - REFIID riid, - LPVOID* ppvObj ) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDirectPlaySPImpl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDirectPlaySP, riid ) ) - { - IDirectPlaySPImpl *This = *ppvObj; - This->lpVtbl = &directPlaySPVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); - - return S_OK; -} - -static ULONG WINAPI DPSP_AddRef -( LPDIRECTPLAYSP iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); - - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - return ulObjRefCount; -} - -static ULONG WINAPI DPSP_Release -( LPDIRECTPLAYSP iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); - - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - DPSP_DestroyDirectPlaySP( This ); - DPSP_DestroyIUnknown( This ); - } - - if( ulInterfaceRefCount == 0 ) - { + FIXME( "Unsupported interface %s\n", debugstr_guid( riid ) ); + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + return ref; +} + +static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); + ULONG ref = InterlockedDecrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if( !ref ) + { + HeapFree( GetProcessHeap(), 0, This->remote_data ); + HeapFree( GetProcessHeap(), 0, This->local_data ); HeapFree( GetProcessHeap(), 0, This ); } - return ulInterfaceRefCount; -} - -static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry -( LPDIRECTPLAYSP iface, - LPCWSTR lpSection, - LPCWSTR lpKey, - LPCVOID lpData, - DWORD dwDataSize, - DWORD dwMaxEntries -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + return ref; +} + +static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry( IDirectPlaySP *iface, LPCWSTR lpSection, + LPCWSTR lpKey, const void *lpData, DWORD dwDataSize, DWORD dwMaxEntries ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); /* Should be able to call the comctl32 undocumented MRU routines. I suspect that the interface works appropriately */ @@ -278,17 +106,11 @@ return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress -( LPDIRECTPLAYSP iface, - REFGUID guidSP, - REFGUID guidDataType, - LPCVOID lpData, - DWORD dwDataSize, - LPVOID lpAddress, - LPDWORD lpdwAddressSize -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress( IDirectPlaySP *iface, REFGUID guidSP, + REFGUID guidDataType, const void *lpData, DWORD dwDataSize, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%s,%s,%p,0x%08x,%p,%p): stub\n", This, debugstr_guid(guidSP), debugstr_guid(guidDataType), @@ -297,15 +119,11 @@ return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress -( LPDIRECTPLAYSP iface, - LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, - LPCVOID lpAddress, - DWORD dwAddressSize, - LPVOID lpContext -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress( IDirectPlaySP *iface, + LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, const void *lpAddress, DWORD dwAddressSize, + void *lpContext ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); TRACE( "(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); @@ -315,31 +133,23 @@ return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries -( LPDIRECTPLAYSP iface, - LPCWSTR lpSection, - LPCWSTR lpKey, - LPENUMMRUCALLBACK lpEnumMRUCallback, - LPVOID lpContext -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries( IDirectPlaySP *iface, LPCWSTR lpSection, + LPCWSTR lpKey, LPENUMMRUCALLBACK lpEnumMRUCallback, void *lpContext ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); /* Should be able to call the comctl32 undocumented MRU routines. I suspect that the interface works appropriately */ - FIXME( "(%p)->(%p,%p,%p,%p,): stub\n", + FIXME( "(%p)->(%p,%p,%p,%p): stub\n", This, lpSection, lpKey, lpEnumMRUCallback, lpContext ); return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPDWORD lpdwPlayerFlags -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags( IDirectPlaySP *iface, DPID idPlayer, + DWORD *lpdwPlayerFlags ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(0x%08x,%p): stub\n", This, idPlayer, lpdwPlayerFlags ); @@ -347,22 +157,17 @@ return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPVOID* lplpData, - LPDWORD lpdwDataSize, - DWORD dwFlags -) -{ +static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer, + void **lplpData, DWORD *lpdwDataSize, DWORD dwFlags ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr; LPDP_SPPLAYERDATA lpPlayerData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, idPlayer, lplpData, lpdwDataSize, dwFlags ); - hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerData ); + hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerData ); if( FAILED(hr) ) { @@ -390,21 +195,16 @@ return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage -( LPDIRECTPLAYSP iface, - LPVOID lpMessageBody, - DWORD dwMessageBodySize, - LPVOID lpMessageHeader -) -{ +static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, void *lpMessageBody, + DWORD dwMessageBodySize, void *lpMessageHeader ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); LPDPMSG_SENDENVELOPE lpMsg = lpMessageBody; HRESULT hr = DPERR_GENERIC; WORD wCommandId; WORD wVersion; DPSP_REPLYDATA data; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - FIXME( "(%p)->(%p,0x%08x,%p): mostly stub\n", This, lpMessageBody, dwMessageBodySize, lpMessageHeader ); @@ -434,9 +234,8 @@ data.dwMessageSize = 0; /* Pass this message to the dplay interface to handle */ - hr = DP_HandleMessage( This->sp->dplay, lpMessageBody, dwMessageBodySize, - lpMessageHeader, wCommandId, wVersion, - &data.lpMessage, &data.dwMessageSize ); + hr = DP_HandleMessage( This->dplay, lpMessageBody, dwMessageBodySize, lpMessageHeader, + wCommandId, wVersion, &data.lpMessage, &data.dwMessageSize ); if( FAILED(hr) ) { @@ -450,7 +249,7 @@ data.idNameServer = 0; data.lpISP = iface; - hr = (This->sp->dplay->dp2->spData.lpCB->Reply)( &data ); + hr = This->dplay->dp2->spData.lpCB->Reply( &data ); if( FAILED(hr) ) { @@ -704,25 +503,17 @@ #endif } -static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPVOID lpData, - DWORD dwDataSize, - DWORD dwFlags -) -{ +static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer, + void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr; LPDP_SPPLAYERDATA lpPlayerEntry; LPVOID lpPlayerData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", - This, idPlayer, lpData, dwDataSize, dwFlags ); - - hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerEntry ); + TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags ); + + hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerEntry ); if( FAILED(hr) ) { /* Player must not exist */ @@ -743,20 +534,16 @@ lpPlayerEntry->dwPlayerRemoteDataSize = dwDataSize; } - hr = DP_SetSPPlayerData( This->sp->dplay, idPlayer, lpPlayerEntry ); + hr = DP_SetSPPlayerData( This->dplay, idPlayer, lpPlayerEntry ); return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress -( LPDIRECTPLAYSP iface, - LPCDPCOMPOUNDADDRESSELEMENT lpElements, - DWORD dwElementCount, - LPVOID lpAddress, - LPDWORD lpdwAddressSize -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress( IDirectPlaySP *iface, + const DPCOMPOUNDADDRESSELEMENT *lpElements, DWORD dwElementCount, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%p,0x%08x,%p,%p): stub\n", This, lpElements, dwElementCount, lpAddress, lpdwAddressSize ); @@ -764,19 +551,13 @@ return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetSPData -( LPDIRECTPLAYSP iface, - LPVOID* lplpData, - LPDWORD lpdwDataSize, - DWORD dwFlags -) -{ +static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void **lplpData, + DWORD *lpdwDataSize, DWORD dwFlags ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr = DP_OK; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(%p,%p,0x%08x)\n", - This, lplpData, lpdwDataSize, dwFlags ); + + TRACE( "(%p)->(%p,%p,0x%08x)\n", This, lplpData, lpdwDataSize, dwFlags ); #if 0 /* This is what the documentation says... */ @@ -800,42 +581,31 @@ /* Yes, we're supposed to return a pointer to the memory we have stored! */ if( dwFlags == DPSET_REMOTE ) { - *lpdwDataSize = This->sp->dwSpRemoteDataSize; - *lplpData = This->sp->lpSpRemoteData; - - if( This->sp->lpSpRemoteData == NULL ) - { + *lpdwDataSize = This->remote_data_size; + *lplpData = This->remote_data; + + if( !This->remote_data ) hr = DPERR_GENERIC; - } } else if( dwFlags == DPSET_LOCAL ) { - *lpdwDataSize = This->sp->dwSpLocalDataSize; - *lplpData = This->sp->lpSpLocalData; - - if( This->sp->lpSpLocalData == NULL ) - { + *lpdwDataSize = This->local_data_size; + *lplpData = This->local_data; + + if( !This->local_data ) hr = DPERR_GENERIC; - } } return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_SetSPData -( LPDIRECTPLAYSP iface, - LPVOID lpData, - DWORD dwDataSize, - DWORD dwFlags -) -{ +static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *lpData, + DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); LPVOID lpSpData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", - This, lpData, dwDataSize, dwFlags ); + TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", This, lpData, dwDataSize, dwFlags ); #if 0 /* This is what the documentation says... */ @@ -860,27 +630,24 @@ /* If we have data already allocated, free it and replace it */ if( dwFlags == DPSET_REMOTE ) { - HeapFree( GetProcessHeap(), 0, This->sp->lpSpRemoteData ); - This->sp->dwSpRemoteDataSize = dwDataSize; - This->sp->lpSpRemoteData = lpSpData; + HeapFree( GetProcessHeap(), 0, This->remote_data ); + This->remote_data_size = dwDataSize; + This->remote_data = lpSpData; } else if ( dwFlags == DPSET_LOCAL ) { - HeapFree( GetProcessHeap(), 0, This->sp->lpSpLocalData ); - This->sp->lpSpLocalData = lpSpData; - This->sp->dwSpLocalDataSize = dwDataSize; + HeapFree( GetProcessHeap(), 0, This->local_data ); + This->local_data = lpSpData; + This->local_data_size = dwDataSize; } return DP_OK; } -static VOID WINAPI IDirectPlaySPImpl_SendComplete -( LPDIRECTPLAYSP iface, - LPVOID unknownA, - DWORD unknownB -) -{ - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; +static void WINAPI IDirectPlaySPImpl_SendComplete( IDirectPlaySP *iface, void *unknownA, + DWORD unknownB ) +{ + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%p,0x%08x): stub\n", This, unknownA, unknownB ); @@ -888,11 +655,9 @@ static const IDirectPlaySPVtbl directPlaySPVT = { - - DPSP_QueryInterface, - DPSP_AddRef, - DPSP_Release, - + IDirectPlaySPImpl_QueryInterface, + IDirectPlaySPImpl_AddRef, + IDirectPlaySPImpl_Release, IDirectPlaySPImpl_AddMRUEntry, IDirectPlaySPImpl_CreateAddress, IDirectPlaySPImpl_EnumAddress, @@ -907,6 +672,27 @@ IDirectPlaySPImpl_SendComplete }; +HRESULT dplaysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) +{ + IDirectPlaySPImpl *obj; + HRESULT hr; + + TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv ); + + *ppv = NULL; + obj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *obj ) ); + if ( !obj ) + return DPERR_OUTOFMEMORY; + + obj->IDirectPlaySP_iface.lpVtbl = &directPlaySPVT; + obj->ref = 1; + obj->dplay = dp; + + hr = IDirectPlaySP_QueryInterface( &obj->IDirectPlaySP_iface, riid, ppv ); + IDirectPlaySP_Release( &obj->IDirectPlaySP_iface ); + + return hr; +} /* DP external interfaces to call into DPSP interface */ Modified: trunk/reactos/dll/directx/wine/dplayx/dplayx.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/dp…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/dplayx.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/dplayx.idl [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep register + [ helpstring("DirectPlay Object"), threading(both), Modified: trunk/reactos/dll/directx/wine/dplayx/dplayx_global.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/dp…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/dplayx_global.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/dplayx_global.c [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -66,9 +66,10 @@ typedef struct { - DWORD used; - DWORD data[dwBlockSize-sizeof(DWORD)]; + BOOL used; + BYTE data[dwBlockSize - sizeof(BOOL)]; } DPLAYX_MEM_SLICE; +C_ASSERT(sizeof(DPLAYX_MEM_SLICE) == dwBlockSize); static DPLAYX_MEM_SLICE* lpMemArea; @@ -83,10 +84,10 @@ return; } - lpAddrStart = (char*)addr - sizeof(DWORD); /* Find block header */ + lpAddrStart = CONTAINING_RECORD(addr, DPLAYX_MEM_SLICE, data); /* Find block header */ dwBlockUsed = ((BYTE*)lpAddrStart - (BYTE*)lpMemArea)/dwBlockSize; - lpMemArea[ dwBlockUsed ].used = 0; + lpMemArea[ dwBlockUsed ].used = FALSE; } static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ) @@ -94,20 +95,20 @@ LPVOID lpvArea = NULL; UINT uBlockUsed; - if( size > (dwBlockSize - sizeof(DWORD)) ) + if( size > (dwBlockSize - sizeof(BOOL)) ) { FIXME( "Size exceeded. Request of 0x%08x\n", size ); - size = dwBlockSize - sizeof(DWORD); + size = dwBlockSize - sizeof(BOOL); } /* Find blank area */ uBlockUsed = 0; - while( ( lpMemArea[ uBlockUsed ].used != 0 ) && ( uBlockUsed <= dwMaxBlock ) ) { uBlockUsed++; } + while( lpMemArea[ uBlockUsed ].used && uBlockUsed <= dwMaxBlock ) { uBlockUsed++; } if( uBlockUsed <= dwMaxBlock ) { /* Set the area used */ - lpMemArea[ uBlockUsed ].used = 1; + lpMemArea[ uBlockUsed ].used = TRUE; lpvArea = lpMemArea[ uBlockUsed ].data; } else @@ -1183,7 +1184,7 @@ /* For errors not in the list, return HRESULT as a string This part is not thread safe */ WARN( "Unknown error 0x%08x\n", hr ); - wsprintfA( szTempStr, "0x%08lx", hr ); + wsprintfA( szTempStr, "0x%08x", hr ); return szTempStr; } } Modified: trunk/reactos/dll/directx/wine/dplayx/lobbysp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dplayx/lo…
============================================================================== --- trunk/reactos/dll/directx/wine/dplayx/lobbysp.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dplayx/lobbysp.c [iso-8859-1] Sun Apr 20 00:08:13 2014 @@ -20,395 +20,180 @@ #include "dplayx_global.h" -/* Prototypes */ -static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ); -static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ); -static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ); -static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); - - -/* Predefine the interface */ -typedef struct IDPLobbySPImpl IDPLobbySPImpl; - -typedef struct tagDPLobbySPIUnknownData -{ - LONG ulObjRef; - CRITICAL_SECTION DPLSP_lock; -} DPLobbySPIUnknownData; - -typedef struct tagDPLobbySPData -{ + +typedef struct IDPLobbySPImpl +{ + IDPLobbySP IDPLobbySP_iface; + LONG ref; IDirectPlayImpl *dplay; -} DPLobbySPData; - -#define DPLSP_IMPL_FIELDS \ - LONG ulInterfaceRef; \ - DPLobbySPIUnknownData* unk; \ - DPLobbySPData* sp; - -struct IDPLobbySPImpl -{ - const IDPLobbySPVtbl *lpVtbl; - DPLSP_IMPL_FIELDS -}; - -/* Forward declaration of virtual tables */ -static const IDPLobbySPVtbl dpLobbySPVT; - -HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) -{ - TRACE( " for %s\n", debugstr_guid( riid ) ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( IDPLobbySPImpl ) ); - - if( *ppvObj == NULL ) +} IDPLobbySPImpl; + +static inline IDPLobbySPImpl *impl_from_IDPLobbySP(IDPLobbySP *iface) +{ + return CONTAINING_RECORD(iface, IDPLobbySPImpl, IDPLobbySP_iface); +} + +static HRESULT WINAPI IDPLobbySPImpl_QueryInterface( IDPLobbySP *iface, REFIID riid, + void **ppv ) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid( riid ), ppv ); + + if ( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDPLobbySP, riid ) ) { - return DPERR_OUTOFMEMORY; - } - - if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) - { - IDPLobbySPImpl *This = *ppvObj; - This->lpVtbl = &dpLobbySPVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - /* Initialize it */ - if( DPLSP_CreateIUnknown( *ppvObj ) && - DPLSP_CreateDPLobbySP( *ppvObj, dp ) - ) - { - IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); + *ppv = iface; + IDPLobbySP_AddRef(iface); return S_OK; } - /* Initialize failed, destroy it */ - DPLSP_DestroyDPLobbySP( *ppvObj ); - DPLSP_DestroyIUnknown( *ppvObj ); - - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return DPERR_NOMEMORY; -} - -static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DPLSP_lock ); - This->unk->DPLSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDPLobbySPImpl*->DPLobbySPIUnknownData*->DPLSP_lock"); - - return TRUE; -} - -static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - This->unk->DPLSP_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DPLSP_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - -static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ) -{ - IDPLobbySPImpl *This = lpSP; - - This->sp = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->sp) ) ); - - if ( This->sp == NULL ) - { - return FALSE; - } - - This->sp->dplay = dp; - - return TRUE; -} - -static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - HeapFree( GetProcessHeap(), 0, This->sp ); - - return TRUE; -} - -static -HRESULT WINAPI DPLSP_QueryInterface -( LPDPLOBBYSP iface, - REFIID riid, - LPVOID* ppvObj -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDPLobbySPImpl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) - { - IDPLobbySPImpl *This = *ppvObj; - This->lpVtbl = &dpLobbySPVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); - - return S_OK; -} - -static -ULONG WINAPI DPLSP_AddRef -( LPDPLOBBYSP iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); - - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - return ulObjRefCount; -} - -static -ULONG WINAPI DPLSP_Release -( LPDPLOBBYSP iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); - - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - DPLSP_DestroyDPLobbySP( This ); - DPLSP_DestroyIUnknown( This ); - } - - if( ulInterfaceRefCount == 0 ) - { + FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI IDPLobbySPImpl_AddRef( IDPLobbySP *iface ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + return ref; +} + +static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); + ULONG ref = InterlockedDecrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if( !ref ) HeapFree( GetProcessHeap(), 0, This ); - } - - return ulInterfaceRefCount; -} - -static -HRESULT WINAPI IDPLobbySPImpl_AddGroupToGroup -( LPDPLOBBYSP iface, - LPSPDATA_ADDREMOTEGROUPTOGROUP argtg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; + + return ref; +} + +static HRESULT WINAPI IDPLobbySPImpl_AddGroupToGroup( IDPLobbySP *iface, + SPDATA_ADDREMOTEGROUPTOGROUP *argtg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, argtg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_AddPlayerToGroup -( LPDPLOBBYSP iface, - LPSPDATA_ADDREMOTEPLAYERTOGROUP arptg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_AddPlayerToGroup( IDPLobbySP *iface, + SPDATA_ADDREMOTEPLAYERTOGROUP *arptg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, arptg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_CreateGroup -( LPDPLOBBYSP iface, - LPSPDATA_CREATEREMOTEGROUP crg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_CreateGroup( IDPLobbySP *iface, + SPDATA_CREATEREMOTEGROUP *crg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, crg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_CreateGroupInGroup -( LPDPLOBBYSP iface, - LPSPDATA_CREATEREMOTEGROUPINGROUP crgig -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_CreateGroupInGroup( IDPLobbySP *iface, + SPDATA_CREATEREMOTEGROUPINGROUP *crgig ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, crgig ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_DeleteGroupFromGroup -( LPDPLOBBYSP iface, - LPSPDATA_DELETEREMOTEGROUPFROMGROUP drgfg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_DeleteGroupFromGroup( IDPLobbySP *iface, + SPDATA_DELETEREMOTEGROUPFROMGROUP *drgfg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, drgfg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_DeletePlayerFromGroup -( LPDPLOBBYSP iface, - LPSPDATA_DELETEREMOTEPLAYERFROMGROUP drpfg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_DeletePlayerFromGroup( IDPLobbySP *iface, + SPDATA_DELETEREMOTEPLAYERFROMGROUP *drpfg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, drpfg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_DestroyGroup -( LPDPLOBBYSP iface, - LPSPDATA_DESTROYREMOTEGROUP drg -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_DestroyGroup( IDPLobbySP *iface, + SPDATA_DESTROYREMOTEGROUP *drg ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, drg ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_EnumSessionsResponse -( LPDPLOBBYSP iface, - LPSPDATA_ENUMSESSIONSRESPONSE er -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_EnumSessionsResponse( IDPLobbySP *iface, + SPDATA_ENUMSESSIONSRESPONSE *er ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, er ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_GetSPDataPointer -( LPDPLOBBYSP iface, - LPVOID* lplpData -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_GetSPDataPointer( IDPLobbySP *iface, LPVOID* lplpData ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, lplpData ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_HandleMessage -( LPDPLOBBYSP iface, - LPSPDATA_HANDLEMESSAGE hm -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_HandleMessage( IDPLobbySP *iface, SPDATA_HANDLEMESSAGE *hm ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, hm ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_SendChatMessage -( LPDPLOBBYSP iface, - LPSPDATA_CHATMESSAGE cm -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_SendChatMessage( IDPLobbySP *iface, + SPDATA_CHATMESSAGE *cm ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, cm ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_SetGroupName -( LPDPLOBBYSP iface, - LPSPDATA_SETREMOTEGROUPNAME srgn -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_SetGroupName( IDPLobbySP *iface, + SPDATA_SETREMOTEGROUPNAME *srgn ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, srgn ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_SetPlayerName -( LPDPLOBBYSP iface, - LPSPDATA_SETREMOTEPLAYERNAME srpn -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_SetPlayerName( IDPLobbySP *iface, + SPDATA_SETREMOTEPLAYERNAME *srpn ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, srpn ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_SetSessionDesc -( LPDPLOBBYSP iface, - LPSPDATA_SETSESSIONDESC ssd -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_SetSessionDesc( IDPLobbySP *iface, + SPDATA_SETSESSIONDESC *ssd ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, ssd ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_SetSPDataPointer -( LPDPLOBBYSP iface, - LPVOID lpData -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_SetSPDataPointer( IDPLobbySP *iface, void *lpData ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, lpData ); return DP_OK; } -static -HRESULT WINAPI IDPLobbySPImpl_StartSession -( LPDPLOBBYSP iface, - LPSPDATA_STARTSESSIONCOMMAND ssc -) -{ - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; +static HRESULT WINAPI IDPLobbySPImpl_StartSession( IDPLobbySP *iface, + SPDATA_STARTSESSIONCOMMAND *ssc ) +{ + IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); FIXME( "(%p)->(%p):stub\n", This, ssc ); return DP_OK; } @@ -416,11 +201,9 @@ static const IDPLobbySPVtbl dpLobbySPVT = { - - DPLSP_QueryInterface, - DPLSP_AddRef, - DPLSP_Release, - + IDPLobbySPImpl_QueryInterface, + IDPLobbySPImpl_AddRef, + IDPLobbySPImpl_Release, IDPLobbySPImpl_AddGroupToGroup, IDPLobbySPImpl_AddPlayerToGroup, IDPLobbySPImpl_CreateGroup, @@ -437,5 +220,26 @@ IDPLobbySPImpl_SetSessionDesc, IDPLobbySPImpl_SetSPDataPointer, IDPLobbySPImpl_StartSession - }; + +HRESULT dplobbysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) +{ + IDPLobbySPImpl *obj; + HRESULT hr; + + TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv ); + + *ppv = NULL; + obj = HeapAlloc( GetProcessHeap(), 0, sizeof( *obj ) ); + if ( !obj ) + return DPERR_OUTOFMEMORY; + + obj->IDPLobbySP_iface.lpVtbl = &dpLobbySPVT; + obj->ref = 1; + obj->dplay = dp; + + hr = IDPLobbySP_QueryInterface( &obj->IDPLobbySP_iface, riid, ppv ); + IDPLobbySP_Release( &obj->IDPLobbySP_iface ); + + return hr; +} 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] Sun Apr 20 00:08:13 2014 @@ -39,7 +39,7 @@ reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.17 reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.17 reactos/dll/directx/wine/dplay # Synced to Wine-1.7.1 -reactos/dll/directx/wine/dplayx # Synced to Wine-1.7.1 +reactos/dll/directx/wine/dplayx # Synced to Wine-1.7.17 reactos/dll/directx/wine/dsound # Synced to Wine-1.5.26 reactos/dll/directx/wine/dxdiagn # Synced to Wine-1.7.1 reactos/dll/directx/wine/dxgi # Synced to Wine-1.7.17
10 years, 8 months
1
0
0
0
[akhaldi] 62827: [DMUSIC] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Apr 20 00:00:52 2014 New Revision: 62827 URL:
http://svn.reactos.org/svn/reactos?rev=62827&view=rev
Log: [DMUSIC] * Sync with Wine 1.7.17. CORE-8080 Removed: trunk/reactos/dll/directx/wine/dmusic/regsvr.c Modified: trunk/reactos/dll/directx/wine/dmusic/collection.c trunk/reactos/dll/directx/wine/dmusic/dmusic.c trunk/reactos/dll/directx/wine/dmusic/dmusic.idl trunk/reactos/dll/directx/wine/dmusic/dmusic_main.c trunk/reactos/dll/directx/wine/dmusic/port.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dmusic/collection.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/co…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/collection.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/collection.c [iso-8859-1] Sun Apr 20 00:00:52 2014 @@ -49,31 +49,22 @@ TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface); - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDirectMusicCollection)) + *ret_iface = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicCollection)) + *ret_iface = iface; + else if (IsEqualIID(riid, &IID_IDirectMusicObject)) + *ret_iface = &This->IDirectMusicObject_iface; + else if (IsEqualIID(riid, &IID_IPersistStream)) + *ret_iface = &This->IPersistStream_iface; + else { - *ret_iface = iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; - } - else if (IsEqualIID(riid, &IID_IDirectMusicObject)) - { - *ret_iface = &This->IDirectMusicObject_iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; - } - else if (IsEqualIID(riid, &IID_IPersistStream)) - { - *ret_iface = &This->IPersistStream_iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; - } - - *ret_iface = NULL; - - WARN("(%p/%p)->(%s, %p): not found\n", iface, This, debugstr_dmguid(riid), ret_iface); - - return E_NOINTERFACE; + WARN("(%p/%p)->(%s, %p): not found\n", iface, This, debugstr_dmguid(riid), ret_iface); + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ret_iface); + return S_OK; } static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPDIRECTMUSICCOLLECTION iface) @@ -191,7 +182,9 @@ TRACE("(%p/%p)->(%p)\n", iface, This, pDesc); - /* I think we shouldn't return pointer here since then values can be changed; it'd be a mess */ + if (!pDesc) + return E_POINTER; + memcpy (pDesc, This->pDesc, This->pDesc->dwSize); return S_OK; @@ -199,7 +192,9 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescriptor(LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc) { - IDirectMusicCollectionImpl *This = impl_from_IDirectMusicObject(iface); + IDirectMusicCollectionImpl *This = impl_from_IDirectMusicObject(iface); + HRESULT ret = S_OK; + TRACE("(%p, %p)\n", iface, pDesc); @@ -216,7 +211,10 @@ if (pDesc->dwValidData & DMUS_OBJ_OBJECT) This->pDesc->guidObject = pDesc->guidObject; if (pDesc->dwValidData & DMUS_OBJ_CLASS) - This->pDesc->guidClass = pDesc->guidClass; + { + pDesc->dwValidData &= ~DMUS_OBJ_CLASS; + ret = S_FALSE; + } if (pDesc->dwValidData & DMUS_OBJ_NAME) lstrcpynW(This->pDesc->wszName, pDesc->wszName, DMUS_MAX_NAME); if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) @@ -239,7 +237,7 @@ /* add new flags */ This->pDesc->dwValidData |= pDesc->dwValidData; - return S_OK; + return ret; } static HRESULT read_from_stream(IStream *stream, void *data, ULONG size) @@ -272,7 +270,7 @@ /* FIXME: should this be determined from stream? */ desc->dwValidData |= DMUS_OBJ_CLASS; - desc->guidClass = CLSID_DirectMusicCollection; + desc->guidClass = This->pDesc->guidClass; hr = read_from_stream(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD)); if (FAILED(hr)) @@ -292,7 +290,7 @@ TRACE_(dmfile)(": RIFF chunk of type %s", debugstr_fourcc(chunk.fccID)); StreamSize = chunk.dwSize - sizeof(FOURCC); - if (chunk.fccID != mmioFOURCC('D','L','S',' ')) { + if (chunk.fccID != FOURCC_DLS) { TRACE_(dmfile)(": unexpected chunk; loading failed)\n"); liMove.QuadPart = StreamSize; IStream_Seek(stream, liMove, STREAM_SEEK_CUR, NULL); /* skip the rest of the chunk */ @@ -342,7 +340,7 @@ ListCount[0] = 0; switch (chunk.fccID) { /* pure INFO list, such can be found in dls collections */ - case mmioFOURCC('I','N','F','O'): + case DMUS_FOURCC_INFO_LIST: TRACE_(dmfile)(": INFO list\n"); do { hr = read_from_stream(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD)); @@ -561,7 +559,7 @@ ListSize[0] = chunk.dwSize - sizeof(FOURCC); ListCount[0] = 0; switch (chunk.fccID) { - case mmioFOURCC('I','N','F','O'): { + case DMUS_FOURCC_INFO_LIST: { TRACE_(dmfile)(": INFO list\n"); do { IStream_Read(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD), NULL); @@ -815,12 +813,16 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { IDirectMusicCollectionImpl* obj; - + HRESULT hr; + + *ppobj = NULL; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCollectionImpl)); - if (NULL == obj) { - *ppobj = NULL; - return E_OUTOFMEMORY; - } + if (!obj) + return E_OUTOFMEMORY; + obj->IDirectMusicCollection_iface.lpVtbl = &DirectMusicCollection_Collection_Vtbl; obj->IDirectMusicObject_iface.lpVtbl = &DirectMusicCollection_Object_Vtbl; obj->IPersistStream_iface.lpVtbl = &DirectMusicCollection_PersistStream_Vtbl; @@ -828,8 +830,11 @@ DM_STRUCT_INIT(obj->pDesc); obj->pDesc->dwValidData |= DMUS_OBJ_CLASS; obj->pDesc->guidClass = CLSID_DirectMusicCollection; - obj->ref = 0; /* will be inited by QueryInterface */ + obj->ref = 1; list_init (&obj->Instruments); - return IDirectMusicCollection_QueryInterface(&obj->IDirectMusicCollection_iface, lpcGUID, ppobj); -} + hr = IDirectMusicCollection_QueryInterface(&obj->IDirectMusicCollection_iface, lpcGUID, ppobj); + IDirectMusicCollection_Release(&obj->IDirectMusicCollection_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] Sun Apr 20 00:00:52 2014 @@ -406,6 +406,8 @@ TRACE("(%p,%p,%p)\n", riid, ret_iface, unkouter); *ret_iface = NULL; + if (unkouter) + return CLASS_E_NOAGGREGATION; dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl)); if (!dmusic) Modified: trunk/reactos/dll/directx/wine/dmusic/dmusic.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmusic.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmusic.idl [iso-8859-1] Sun Apr 20 00:00:52 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep register + [ threading(both), progid("Microsoft.DirectMusic.1"), Modified: trunk/reactos/dll/directx/wine/dmusic/dmusic_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/dmusic_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/dmusic_main.c [iso-8859-1] Sun Apr 20 00:00:52 2014 @@ -221,7 +221,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), 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] Sun Apr 20 00:00:52 2014 @@ -685,7 +685,7 @@ HRESULT hr = E_FAIL; int i; - TRACE("(%p,%p,%p,%p,%p%d)\n", guid, object, unkouter, port_params, port_caps, device); + TRACE("(%p,%p,%p,%p,%p,%d)\n", guid, object, unkouter, port_params, port_caps, device); *object = NULL; Removed: trunk/reactos/dll/directx/wine/dmusic/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/re…
============================================================================== --- trunk/reactos/dll/directx/wine/dmusic/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dmusic/regsvr.c (removed) @@ -1,473 +0,0 @@ -/* - * self-registerable dll functions for dmusic.dll - * - * Copyright (C) 2003 John K. Hohm - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "dmusic_private.h" - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface { - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass { - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) { - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - sprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) { - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = RegDeleteTreeW(interface_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) { - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) { - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) { - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) { - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) { - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) { - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_DirectMusic, - "DirectMusic", - NULL, - "dmusic.dll", - "Both", - "Microsoft.DirectMusic.1", - "Microsoft.DirectMusic" - }, - { &CLSID_DirectMusicCollection, - "DirectMusicCollection", - NULL, - "dmusic.dll", - "Both", - "Microsoft.DirectMusicCollection.1", - "Microsoft.DirectMusicCollection" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ - -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (DMUSIC.3) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (DMUSIC.4) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} 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] Sun Apr 20 00:00:52 2014 @@ -37,7 +37,7 @@ reactos/dll/directx/wine/devenum # Synced to Wine-1.7.17 reactos/dll/directx/wine/dinput # Synced to Wine-1.7.17 reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.17 -reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.1 +reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.17 reactos/dll/directx/wine/dplay # Synced to Wine-1.7.1 reactos/dll/directx/wine/dplayx # Synced to Wine-1.7.1 reactos/dll/directx/wine/dsound # Synced to Wine-1.5.26
10 years, 8 months
1
0
0
0
[akhaldi] 62826: [DINPUT8] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 23:50:01 2014 New Revision: 62826 URL:
http://svn.reactos.org/svn/reactos?rev=62826&view=rev
Log: [DINPUT8] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/directx/wine/dinput8/dinput8.idl trunk/reactos/dll/directx/wine/dinput8/dinput8_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dinput8/dinput8.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput8/d…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput8/dinput8.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput8/dinput8.idl [iso-8859-1] Sat Apr 19 23:50:01 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep register + [ helpstring("DirectInput8 Object"), threading(both), Modified: trunk/reactos/dll/directx/wine/dinput8/dinput8_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput8/d…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput8/dinput8_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput8/dinput8_main.c [iso-8859-1] Sat Apr 19 23:50:01 2014 @@ -61,7 +61,7 @@ IDirectInputA *pDI; HRESULT hr, hrCo; - TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p))\n", hinst, dwVersion, debugstr_guid(riid), punkOuter); + TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p)\n", hinst, dwVersion, debugstr_guid(riid), punkOuter); if (!ppDI) 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] Sat Apr 19 23:50:01 2014 @@ -36,7 +36,7 @@ reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.17 reactos/dll/directx/wine/devenum # Synced to Wine-1.7.17 reactos/dll/directx/wine/dinput # Synced to Wine-1.7.17 -reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.1 +reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.17 reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.1 reactos/dll/directx/wine/dplay # Synced to Wine-1.7.1 reactos/dll/directx/wine/dplayx # Synced to Wine-1.7.1
10 years, 8 months
1
0
0
0
[akhaldi] 62825: [DINPUT_WINETEST] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 23:44:04 2014 New Revision: 62825 URL:
http://svn.reactos.org/svn/reactos?rev=62825&view=rev
Log: [DINPUT_WINETEST] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/rostests/winetests/dinput/device.c trunk/rostests/winetests/dinput/joystick.c trunk/rostests/winetests/dinput/keyboard.c trunk/rostests/winetests/dinput/mouse.c Modified: trunk/rostests/winetests/dinput/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/device.c…
============================================================================== --- trunk/rostests/winetests/dinput/device.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dinput/device.c [iso-8859-1] Sat Apr 19 23:44:04 2014 @@ -59,7 +59,7 @@ (LPDIOBJECTDATAFORMAT)obj_data_format }; -static BOOL CALLBACK enum_callback(LPCDIDEVICEOBJECTINSTANCE oi, LPVOID info) +static BOOL CALLBACK enum_callback(const DIDEVICEOBJECTINSTANCEA *oi, void *info) { if (winetest_debug > 1) trace(" Type:%4x Ofs:%3d Flags:%08x Name:%s\n", @@ -68,18 +68,18 @@ return DIENUM_CONTINUE; } -static BOOL CALLBACK enum_type_callback(LPCDIDEVICEOBJECTINSTANCE oi, LPVOID info) +static BOOL CALLBACK enum_type_callback(const DIDEVICEOBJECTINSTANCEA *oi, void *info) { DWORD expected = *(DWORD*)info; ok (expected & DIDFT_GETTYPE(oi->dwType), "EnumObjects() enumerated wrong type for obj %s, expected: %08x got: %08x\n", oi->tszName, expected, oi->dwType); return DIENUM_CONTINUE; } -static void test_object_info(LPDIRECTINPUTDEVICE device, HWND hwnd) +static void test_object_info(IDirectInputDeviceA *device, HWND hwnd) { HRESULT hr; DIPROPDWORD dp; - DIDEVICEOBJECTINSTANCE obj_info; + DIDEVICEOBJECTINSTANCEA obj_info; DWORD obj_types[] = {DIDFT_BUTTON, DIDFT_AXIS, DIDFT_POV}; int type_index; int cnt1 = 0; @@ -174,14 +174,14 @@ struct enum_data { - LPDIRECTINPUT pDI; + IDirectInputA *pDI; HWND hwnd; }; -static BOOL CALLBACK enum_devices(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) +static BOOL CALLBACK enum_devices(const DIDEVICEINSTANCEA *lpddi, void *pvRef) { struct enum_data *data = pvRef; - LPDIRECTINPUTDEVICE device, obj = NULL; + IDirectInputDeviceA *device, *obj = NULL; HRESULT hr; hr = IDirectInput_GetDeviceStatus(data->pDI, &lpddi->guidInstance); @@ -212,8 +212,8 @@ static void device_tests(void) { HRESULT hr; - LPDIRECTINPUT pDI = NULL, obj = NULL; - HINSTANCE hInstance = GetModuleHandle(NULL); + IDirectInputA *pDI = NULL, *obj = NULL; + HINSTANCE hInstance = GetModuleHandleW(NULL); HWND hwnd; struct enum_data data; @@ -223,7 +223,7 @@ skip("Tests require a newer dinput version\n"); return; } - ok(SUCCEEDED(hr), "DirectInputCreate() failed: %08x\n", hr); + ok(SUCCEEDED(hr), "DirectInputCreateA() failed: %08x\n", hr); if (FAILED(hr)) return; hr = IDirectInput_Initialize(pDI, hInstance, DIRECTINPUT_VERSION); @@ -233,8 +233,8 @@ hr = IUnknown_QueryInterface(pDI, &IID_IDirectInput2W, (LPVOID*)&obj); ok(SUCCEEDED(hr), "QueryInterface(IDirectInput7W) failed: %08x\n", hr); - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); + hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, + NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); if (hwnd) { @@ -250,7 +250,7 @@ hr = IDirectInput_GetDeviceStatus(pDI, &GUID_Joystick); if (hr == DI_OK) { - LPDIRECTINPUTDEVICE device = NULL; + IDirectInputDeviceA *device = NULL; hr = IDirectInput_CreateDevice(pDI, &GUID_Joystick, &device, NULL); ok(SUCCEEDED(hr), "IDirectInput_CreateDevice() failed: %08x\n", hr); 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] Sat Apr 19 23:44:04 2014 @@ -38,7 +38,7 @@ #define numObjects(x) (sizeof(x) / sizeof(x[0])) typedef struct tagUserData { - LPDIRECTINPUT pDI; + IDirectInputA *pDI; DWORD version; } UserData; @@ -81,7 +81,7 @@ typedef struct tagJoystickInfo { - LPDIRECTINPUTDEVICE pJoystick; + IDirectInputDeviceA *pJoystick; DWORD axis; DWORD pov; DWORD button; @@ -95,9 +95,7 @@ return IUnknown_Release( object ); } -static BOOL CALLBACK EnumAxes( - const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext) +static BOOL CALLBACK EnumAxes(const DIDEVICEOBJECTINSTANCEA *pdidoi, void *pContext) { HRESULT hr; JoystickInfo * info = pContext; @@ -170,21 +168,19 @@ E_INVALIDARG, S_OK, S_OK, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG}; -static BOOL CALLBACK EnumJoysticks( - LPCDIDEVICEINSTANCE lpddi, - LPVOID pvRef) +static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef) { HRESULT hr; UserData * data = pvRef; - LPDIRECTINPUTDEVICE pJoystick; + IDirectInputDeviceA *pJoystick; DIDATAFORMAT format; DIDEVCAPS caps; DIJOYSTATE2 js; JoystickInfo info; int i, count; ULONG ref; - DIDEVICEINSTANCE inst; - DIDEVICEINSTANCE_DX3 inst3; + DIDEVICEINSTANCEA inst; + DIDEVICEINSTANCE_DX3A inst3; DIPROPDWORD dipw; DIPROPSTRING dps; DIPROPGUIDANDPATH dpg; @@ -340,7 +336,7 @@ ok(hr==DI_OK,"IDirectInputDevice_GetDeviceInfo() failed: %08x\n", hr); inst3.dwSize = sizeof(inst3); - hr = IDirectInputDevice_GetDeviceInfo(pJoystick, (LPDIDEVICEINSTANCE)&inst3); + hr = IDirectInputDevice_GetDeviceInfo(pJoystick, (DIDEVICEINSTANCEA*)&inst3); ok(hr==DI_OK,"IDirectInputDevice_GetDeviceInfo() failed: %08x\n", hr); hr = IDirectInputDevice_Unacquire(pJoystick); @@ -370,7 +366,7 @@ LPDIRECTINPUTEFFECT effect = NULL; LONG cnt1, cnt2; HWND real_hWnd; - HINSTANCE hInstance = GetModuleHandle(NULL); + HINSTANCE hInstance = GetModuleHandleW(NULL); DIPROPDWORD dip_gain_set, dip_gain_get; trace("Testing force-feedback\n"); @@ -393,9 +389,9 @@ * IDirectInputDevice_SetCooperativeLevel * - a visible window */ - real_hWnd = CreateWindowEx(0, "EDIT", "Test text", 0, 10, 10, 300, - 300, NULL, NULL, hInstance, NULL); - ok(real_hWnd!=0,"CreateWindowEx failed: %p\n", real_hWnd); + 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); @@ -407,7 +403,7 @@ cnt1 = get_refcount((IUnknown*)pJoystick); - hr = IDirectInputDevice2_CreateEffect((LPDIRECTINPUTDEVICE2)pJoystick, &GUID_ConstantForce, + hr = IDirectInputDevice2_CreateEffect((IDirectInputDevice2A*)pJoystick, &GUID_ConstantForce, &eff, &effect, NULL); ok(hr == DI_OK, "IDirectInputDevice_CreateEffect() failed: %08x\n", hr); cnt2 = get_refcount((IUnknown*)pJoystick); @@ -559,7 +555,7 @@ ok(hr==DI_OK, "IDirectInputDevice_SetProperty() failed: %08x\n", hr); hr = IDirectInputDevice_GetProperty(pJoystick, DIPROP_FFGAIN, &dip_gain_get.diph); ok(hr==DI_OK, "IDirectInputDevice_GetProperty() failed: %08x\n", hr); - ok(dip_gain_get.dwData==dip_gain_set.dwData, "Gain not udated: %i\n", dip_gain_get.dwData); + ok(dip_gain_get.dwData==dip_gain_set.dwData, "Gain not updated: %i\n", dip_gain_get.dwData); hr = IDirectInputDevice_Acquire(pJoystick); ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); dip_gain_set.dwData = 2; @@ -567,7 +563,7 @@ ok(hr==DI_OK, "IDirectInputDevice_SetProperty() failed: %08x\n", hr); hr = IDirectInputDevice_GetProperty(pJoystick, DIPROP_FFGAIN, &dip_gain_get.diph); ok(hr==DI_OK, "IDirectInputDevice_GetProperty() failed: %08x\n", hr); - ok(dip_gain_get.dwData==dip_gain_set.dwData, "Gain not udated: %i\n", dip_gain_get.dwData); + ok(dip_gain_get.dwData==dip_gain_set.dwData, "Gain not updated: %i\n", dip_gain_get.dwData); /* Test range and internal clamping. */ dip_gain_set.dwData = -1; hr = IDirectInputDevice_SetProperty(pJoystick, DIPROP_FFGAIN, &dip_gain_set.diph); @@ -656,14 +652,13 @@ static void joystick_tests(DWORD version) { HRESULT hr; - LPDIRECTINPUT pDI; + IDirectInputA *pDI; ULONG ref; - HINSTANCE hInstance = GetModuleHandle(NULL); + HINSTANCE hInstance = GetModuleHandleW(NULL); trace("-- Testing Direct Input Version 0x%04x --\n", version); - hr = DirectInputCreate(hInstance, version, &pDI, NULL); - ok(hr==DI_OK||hr==DIERR_OLDDIRECTINPUTVERSION, - "DirectInputCreate() failed: %08x\n", hr); + hr = DirectInputCreateA(hInstance, version, &pDI, NULL); + ok(hr==DI_OK||hr==DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreateA() failed: %08x\n", hr); if (hr==DI_OK && pDI!=0) { UserData data; data.pDI = pDI; Modified: trunk/rostests/winetests/dinput/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/keyboard…
============================================================================== --- trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] Sat Apr 19 23:44:04 2014 @@ -34,10 +34,10 @@ //#include "wingdi.h" #include <dinput.h> -static void acquire_tests(LPDIRECTINPUT pDI, HWND hwnd) -{ - HRESULT hr; - LPDIRECTINPUTDEVICE pKeyboard; +static void acquire_tests(IDirectInputA *pDI, HWND hwnd) +{ + HRESULT hr; + IDirectInputDeviceA *pKeyboard; BYTE kbd_state[256]; LONG custom_state[6]; int i; @@ -116,10 +116,10 @@ E_INVALIDARG, E_HANDLE, E_HANDLE, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG}; -static void test_set_coop(LPDIRECTINPUT pDI, HWND hwnd) -{ - HRESULT hr; - LPDIRECTINPUTDEVICE pKeyboard = NULL; +static void test_set_coop(IDirectInputA *pDI, HWND hwnd) +{ + HRESULT hr; + IDirectInputDeviceA *pKeyboard = NULL; int i; HWND child; @@ -138,8 +138,8 @@ ok(hr == SetCoop_real_window[i], "SetCooperativeLevel(hwnd, %d): %08x\n", i, hr); } - child = CreateWindow("static", "Title", WS_CHILD | WS_VISIBLE, - 10, 10, 50, 50, hwnd, NULL, NULL, NULL); + child = CreateWindowA("static", "Title", WS_CHILD | WS_VISIBLE, 10, 10, 50, 50, hwnd, NULL, + NULL, NULL); ok(child != NULL, "err: %d\n", GetLastError()); for (i=0; i<16; i++) @@ -152,10 +152,10 @@ if (pKeyboard) IUnknown_Release(pKeyboard); } -static void test_get_prop(LPDIRECTINPUT pDI, HWND hwnd) -{ - HRESULT hr; - LPDIRECTINPUTDEVICE pKeyboard = NULL; +static void test_get_prop(IDirectInputA *pDI, HWND hwnd) +{ + HRESULT hr; + IDirectInputDeviceA *pKeyboard = NULL; DIPROPRANGE diprg; hr = IDirectInput_CreateDevice(pDI, &GUID_SysKeyboard, &pKeyboard, NULL); @@ -174,10 +174,10 @@ if (pKeyboard) IUnknown_Release(pKeyboard); } -static void test_capabilities(LPDIRECTINPUT pDI, HWND hwnd) -{ - HRESULT hr; - LPDIRECTINPUTDEVICE pKeyboard = NULL; +static void test_capabilities(IDirectInputA *pDI, HWND hwnd) +{ + HRESULT hr; + IDirectInputDeviceA *pKeyboard = NULL; DIDEVCAPS caps; hr = IDirectInput_CreateDevice(pDI, &GUID_SysKeyboard, &pKeyboard, NULL); @@ -200,22 +200,22 @@ static void keyboard_tests(DWORD version) { HRESULT hr; - LPDIRECTINPUT pDI = NULL; - HINSTANCE hInstance = GetModuleHandle(NULL); + IDirectInputA *pDI = NULL; + HINSTANCE hInstance = GetModuleHandleW(NULL); HWND hwnd; ULONG ref = 0; - hr = DirectInputCreate(hInstance, version, &pDI, NULL); + hr = DirectInputCreateA(hInstance, version, &pDI, NULL); if (hr == DIERR_OLDDIRECTINPUTVERSION) { skip("Tests require a newer dinput version\n"); return; } - ok(SUCCEEDED(hr), "DirectInputCreate() failed: %08x\n", hr); - if (FAILED(hr)) return; - - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "DirectInputCreateA() failed: %08x\n", hr); + if (FAILED(hr)) return; + + hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, + NULL, NULL, NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); if (hwnd) Modified: trunk/rostests/winetests/dinput/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/mouse.c?…
============================================================================== --- trunk/rostests/winetests/dinput/mouse.c [iso-8859-1] (original) +++ trunk/rostests/winetests/dinput/mouse.c [iso-8859-1] Sat Apr 19 23:44:04 2014 @@ -52,10 +52,10 @@ E_INVALIDARG, E_HANDLE, E_HANDLE, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG}; -static void test_set_coop(LPDIRECTINPUT pDI, HWND hwnd) +static void test_set_coop(IDirectInputA *pDI, HWND hwnd) { HRESULT hr; - LPDIRECTINPUTDEVICE pMouse = NULL; + IDirectInputDeviceA *pMouse = NULL; int i; HWND child; @@ -74,8 +74,8 @@ ok(hr == SetCoop_real_window[i], "SetCooperativeLevel(hwnd, %d): %08x\n", i, hr); } - child = CreateWindow("static", "Title", WS_CHILD | WS_VISIBLE, - 10, 10, 50, 50, hwnd, NULL, NULL, NULL); + child = CreateWindowA("static", "Title", WS_CHILD | WS_VISIBLE, 10, 10, 50, 50, hwnd, NULL, + NULL, NULL); ok(child != NULL, "err: %d\n", GetLastError()); for (i=0; i<16; i++) @@ -88,10 +88,10 @@ if (pMouse) IUnknown_Release(pMouse); } -static void test_acquire(LPDIRECTINPUT pDI, HWND hwnd) +static void test_acquire(IDirectInputA *pDI, HWND hwnd) { HRESULT hr; - LPDIRECTINPUTDEVICE pMouse = NULL; + IDirectInputDeviceA *pMouse = NULL; DIMOUSESTATE m_state; HWND hwnd2; DIPROPDWORD di_op; @@ -132,8 +132,8 @@ /* Foreground coop level requires window to have focus */ /* Create a temporary window, this should make dinput * loose mouse input */ - hwnd2 = CreateWindow("static", "Temporary", WS_VISIBLE, - 10, 210, 200, 200, NULL, NULL, NULL, NULL); + hwnd2 = CreateWindowA("static", "Temporary", WS_VISIBLE, 10, 210, 200, 200, NULL, NULL, NULL, + NULL); hr = IDirectInputDevice_GetDeviceState(pMouse, sizeof(m_state), &m_state); ok(hr == DIERR_NOTACQUIRED, "GetDeviceState() should have failed: %08x\n", hr); @@ -185,22 +185,22 @@ static void mouse_tests(void) { HRESULT hr; - LPDIRECTINPUT pDI = NULL; - HINSTANCE hInstance = GetModuleHandle(NULL); + IDirectInputA *pDI = NULL; + HINSTANCE hInstance = GetModuleHandleW(NULL); HWND hwnd; ULONG ref = 0; - hr = DirectInputCreate(hInstance, DIRECTINPUT_VERSION, &pDI, NULL); + hr = DirectInputCreateA(hInstance, DIRECTINPUT_VERSION, &pDI, NULL); if (hr == DIERR_OLDDIRECTINPUTVERSION) { skip("Tests require a newer dinput version\n"); return; } - ok(SUCCEEDED(hr), "DirectInputCreate() failed: %08x\n", hr); + ok(SUCCEEDED(hr), "DirectInputCreateA() failed: %08x\n", hr); if (FAILED(hr)) return; - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); + hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, + NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); if (hwnd) {
10 years, 8 months
1
0
0
0
[akhaldi] 62824: [DINPUT] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 23:43:51 2014 New Revision: 62824 URL:
http://svn.reactos.org/svn/reactos?rev=62824&view=rev
Log: [DINPUT] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/directx/wine/dinput/device.c trunk/reactos/dll/directx/wine/dinput/dinput_classes.idl 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/dll/directx/wine/dinput/keyboard.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/dinput/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/de…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/device.c [iso-8859-1] Sat Apr 19 23:43:51 2014 @@ -561,7 +561,7 @@ DWORD type = (0x0000ff00 & dwSemantic) >> 8; DWORD offset = 0x000000ff & dwSemantic; DWORD obj_instance = 0; - DWORD found = 0; + BOOL found = FALSE; int i; for (i = 0; i < This->data_format.wine_df->dwNumObjs; i++) @@ -571,7 +571,7 @@ if (odf->dwOfs == offset) { obj_instance = DIDFT_GETINSTANCE(odf->dwType); - found = 1; + found = TRUE; break; } } @@ -705,8 +705,8 @@ IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); WCHAR username[MAX_PATH]; DWORD username_size = MAX_PATH; - int i, has_actions = 0; - BOOL load_success = FALSE; + int i; + BOOL load_success = FALSE, has_actions = FALSE; /* Unless asked the contrary by these flags, try to load a previous mapping */ if (!(dwFlags & DIDBAM_HWDEFAULTS)) @@ -746,7 +746,7 @@ lpdiaf->rgoAction[i].dwObjID = obj_id; lpdiaf->rgoAction[i].guidInstance = This->guid; lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT; - has_actions = 1; + has_actions = TRUE; } } else if (!(dwFlags & DIDBAM_PRESERVE)) Modified: trunk/reactos/dll/directx/wine/dinput/dinput_classes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/dinput_classes.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/dinput_classes.idl [iso-8859-1] Sat Apr 19 23:43:51 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep register + [ helpstring("DirectInput Object"), threading(both), 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] Sat Apr 19 23:43:51 2014 @@ -57,7 +57,7 @@ struct ff_effect effect; /* Effect data */ int gain; /* Effect gain */ - int first_axis_is_x; + BOOL first_axis_is_x; int* fd; /* Parent device */ struct list *entry; /* Entry into the parent's list of effects */ }; 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] Sat Apr 19 23:43:51 2014 @@ -706,7 +706,7 @@ { JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); unsigned int i, j; - int has_actions = 0; + BOOL has_actions = FALSE; DWORD object_types[] = { DIDFT_AXIS, DIDFT_BUTTON }; DWORD type_map[] = { DIDFT_RELAXIS, DIDFT_PSHBUTTON }; @@ -737,7 +737,7 @@ lpdiaf->rgoAction[i].guidInstance = This->base.guid; lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT; - has_actions = 1; + has_actions = TRUE; /* No need to try other types if the action was already mapped */ break; 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] Sat Apr 19 23:43:51 2014 @@ -160,7 +160,7 @@ if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0) { - WARN("ioctl(%s,JSIOCGNAME) failed: %s\n", joydev.device, strerror(errno)); + WARN("ioctl(%s,JSIOCGAXMAP) failed: %s\n", joydev.device, strerror(errno)); joydev.dev_axes_map = NULL; } else @@ -669,8 +669,7 @@ } } if (inst_id >= 0) - queue_event(iface, inst_id, - value, jse.time, This->generic.base.dinput->evsequence++); + queue_event(iface, inst_id, value, GetCurrentTime(), This->generic.base.dinput->evsequence++); } } 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] Sat Apr 19 23:43:51 2014 @@ -78,7 +78,7 @@ char *name; GUID guid; - int has_ff; + BOOL has_ff; int num_effects; /* data returned by EVIOCGBIT for caps, EV_ABS, EV_KEY, and EV_FF */ @@ -165,7 +165,7 @@ char buf[MAX_PATH]; struct JoyDev joydev = {0}; int fd; - int no_ff_check = 0; + BOOL no_ff_check = FALSE; int j; struct JoyDev *new_joydevs; struct input_id device_id = {0}; @@ -175,7 +175,7 @@ if ((fd = open(buf, O_RDWR)) == -1) { fd = open(buf, O_RDONLY); - no_ff_check = 1; + no_ff_check = TRUE; } if (fd == -1) @@ -186,19 +186,19 @@ if (ioctl(fd, EVIOCGBIT(0, sizeof(joydev.evbits)), joydev.evbits) == -1) { - WARN("ioct(EVIOCGBIT, 0) failed: %d %s\n", errno, strerror(errno)); + WARN("ioctl(EVIOCGBIT, 0) failed: %d %s\n", errno, strerror(errno)); close(fd); continue; } if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(joydev.absbits)), joydev.absbits) == -1) { - WARN("ioct(EVIOCGBIT, EV_ABS) failed: %d %s\n", errno, strerror(errno)); + WARN("ioctl(EVIOCGBIT, EV_ABS) failed: %d %s\n", errno, strerror(errno)); close(fd); continue; } if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(joydev.keybits)), joydev.keybits) == -1) { - WARN("ioct(EVIOCGBIT, EV_KEY) failed: %d %s\n", errno, strerror(errno)); + WARN("ioctl(EVIOCGBIT, EV_KEY) failed: %d %s\n", errno, strerror(errno)); close(fd); continue; } @@ -256,7 +256,7 @@ joydev.num_effects > 0) { TRACE(" ... with force feedback\n"); - joydev.has_ff = 1; + joydev.has_ff = TRUE; } #endif @@ -277,7 +277,7 @@ } if (ioctl(fd, EVIOCGID, &device_id) == -1) - WARN("ioct(EVIOCGBIT, EV_ABS) failed: %d %s\n", errno, strerror(errno)); + WARN("ioctl(EVIOCGID) failed: %d %s\n", errno, strerror(errno)); else { joydev.vendor_id = device_id.vendor; @@ -854,7 +854,7 @@ } if (inst_id >= 0) queue_event(iface, inst_id, - value, ie.time.tv_usec, This->generic.base.dinput->evsequence++); + value, GetCurrentTime(), This->generic.base.dinput->evsequence++); } } 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] Sat Apr 19 23:43:51 2014 @@ -95,8 +95,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); -static IOHIDManagerRef gIOHIDManagerRef = NULL; -static CFArrayRef gCollections = NULL; +static CFMutableArrayRef device_main_elements = NULL; typedef struct JoystickImpl JoystickImpl; static const IDirectInputDevice8AVtbl JoystickAvt; @@ -108,7 +107,7 @@ /* osx private */ int id; - CFMutableArrayRef elementCFArrayRef; + CFArrayRef elements; ObjProps **propmap; FFDeviceObjectReference ff; struct list effects; @@ -181,36 +180,85 @@ CFArrayAppendValue( ( CFMutableArrayRef ) context, value ); } +static const char* debugstr_cf(CFTypeRef t) +{ + CFStringRef s; + const char* ret; + + if (!t) return "(null)"; + + if (CFGetTypeID(t) == CFStringGetTypeID()) + s = t; + else + s = CFCopyDescription(t); + ret = CFStringGetCStringPtr(s, kCFStringEncodingUTF8); + if (ret) ret = debugstr_a(ret); + if (!ret) + { + const UniChar* u = CFStringGetCharactersPtr(s); + if (u) + ret = debugstr_wn((const WCHAR*)u, CFStringGetLength(s)); + } + if (!ret) + { + UniChar buf[200]; + int len = min(CFStringGetLength(s), sizeof(buf)/sizeof(buf[0])); + CFStringGetCharacters(s, CFRangeMake(0, len), buf); + ret = debugstr_wn(buf, len); + } + if (s != t) CFRelease(s); + return ret; +} + +static const char* debugstr_device(IOHIDDeviceRef device) +{ + return wine_dbg_sprintf("<IOHIDDevice %p product %s>", device, + debugstr_cf(IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductKey)))); +} + +static const char* debugstr_element(IOHIDElementRef element) +{ + return wine_dbg_sprintf("<IOHIDElement %p type %d usage %u/%u device %p>", element, + IOHIDElementGetType(element), IOHIDElementGetUsagePage(element), + IOHIDElementGetUsage(element), IOHIDElementGetDevice(element)); +} + static IOHIDDeviceRef get_device_ref(int id) { - IOHIDElementRef tIOHIDElementRef; - IOHIDDeviceRef tIOHIDDeviceRef; - - if (!gCollections) + IOHIDElementRef device_main_element; + IOHIDDeviceRef hid_device; + + TRACE("id %d\n", id); + + if (!device_main_elements || id >= CFArrayGetCount(device_main_elements)) return 0; - tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, id); - if (!tIOHIDElementRef) + device_main_element = (IOHIDElementRef)CFArrayGetValueAtIndex(device_main_elements, id); + if (!device_main_element) { ERR("Invalid Element requested %i\n",id); return 0; } - tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDElementRef); - if (!tIOHIDDeviceRef) + hid_device = IOHIDElementGetDevice(device_main_element); + if (!hid_device) { ERR("Invalid Device requested %i\n",id); return 0; } - return tIOHIDDeviceRef; + TRACE("-> %s\n", debugstr_device(hid_device)); + return hid_device; } static HRESULT get_ff(IOHIDDeviceRef device, FFDeviceObjectReference *ret) { io_service_t service; CFMutableDictionaryRef matching; - CFTypeRef type; + CFTypeRef location_id; + HRESULT hr; + + TRACE("device %s\n", debugstr_device(device)); matching = IOServiceMatching(kIOHIDDeviceKey); if(!matching){ @@ -218,26 +266,32 @@ return DIERR_DEVICENOTREG; } - type = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDLocationIDKey)); - if(!matching){ + location_id = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDLocationIDKey)); + if(!location_id){ CFRelease(matching); WARN("IOHIDDeviceGetProperty failed, force feedback disabled\n"); return DIERR_DEVICENOTREG; } - CFDictionaryAddValue(matching, CFSTR(kIOHIDLocationIDKey), type); + CFDictionaryAddValue(matching, CFSTR(kIOHIDLocationIDKey), location_id); service = IOServiceGetMatchingService(kIOMasterPortDefault, matching); - if(!ret) - return FFIsForceFeedback(service) == FF_OK ? S_OK : S_FALSE; - - return osx_to_win32_hresult(FFCreateDevice(service, ret)); -} - -static CFMutableDictionaryRef creates_osx_device_match(int usage) + if (ret) + hr = osx_to_win32_hresult(FFCreateDevice(service, ret)); + else + hr = FFIsForceFeedback(service) == FF_OK ? S_OK : S_FALSE; + + IOObjectRelease(service); + TRACE("-> hr 0x%08x *ret %p\n", hr, ret ? *ret : NULL); + return hr; +} + +static CFMutableDictionaryRef create_osx_device_match(int usage) { CFMutableDictionaryRef result; + + TRACE("usage %d\n", usage); result = CFDictionaryCreateMutable( kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks ); @@ -245,34 +299,34 @@ if ( result ) { int number = kHIDPage_GenericDesktop; - CFNumberRef pageCFNumberRef = CFNumberCreate( kCFAllocatorDefault, + CFNumberRef page = CFNumberCreate( kCFAllocatorDefault, kCFNumberIntType, &number); - if ( pageCFNumberRef ) + if (page) { - CFNumberRef usageCFNumberRef; - - CFDictionarySetValue( result, CFSTR( kIOHIDDeviceUsagePageKey ), - pageCFNumberRef ); - CFRelease( pageCFNumberRef ); - - usageCFNumberRef = CFNumberCreate( kCFAllocatorDefault, + CFNumberRef cf_usage; + + CFDictionarySetValue( result, CFSTR( kIOHIDDeviceUsagePageKey ), page ); + CFRelease( page ); + + cf_usage = CFNumberCreate( kCFAllocatorDefault, kCFNumberIntType, &usage); - if ( usageCFNumberRef ) + if (cf_usage) { - CFDictionarySetValue( result, CFSTR( kIOHIDDeviceUsageKey ), - usageCFNumberRef ); - CFRelease( usageCFNumberRef ); + CFDictionarySetValue( result, CFSTR( kIOHIDDeviceUsageKey ), cf_usage ); + CFRelease( cf_usage ); } else { ERR("CFNumberCreate() failed.\n"); + CFRelease(result); return NULL; } } else { ERR("CFNumberCreate failed.\n"); + CFRelease(result); return NULL; } } @@ -285,76 +339,86 @@ return result; } -static CFIndex find_top_level(IOHIDDeviceRef tIOHIDDeviceRef, CFArrayRef topLevels) -{ - CFArrayRef gElementCFArrayRef; - CFIndex numTops = 0; - - if (!tIOHIDDeviceRef) +static CFIndex find_top_level(IOHIDDeviceRef hid_device, CFMutableArrayRef main_elements) +{ + CFArrayRef elements; + CFIndex total = 0; + + TRACE("hid_device %s\n", debugstr_device(hid_device)); + + if (!hid_device) return 0; - gElementCFArrayRef = IOHIDDeviceCopyMatchingElements(tIOHIDDeviceRef, NULL, 0); - - if (gElementCFArrayRef) - { - CFIndex idx, cnt = CFArrayGetCount(gElementCFArrayRef); + elements = IOHIDDeviceCopyMatchingElements(hid_device, NULL, 0); + + if (elements) + { + CFIndex idx, cnt = CFArrayGetCount(elements); for (idx=0; idx<cnt; idx++) { - IOHIDElementRef tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gElementCFArrayRef, idx); - int eleType = IOHIDElementGetType(tIOHIDElementRef); + IOHIDElementRef element = (IOHIDElementRef)CFArrayGetValueAtIndex(elements, idx); + int type = IOHIDElementGetType(element); + + TRACE("element %s\n", debugstr_element(element)); /* Check for top-level gaming device collections */ - if (eleType == kIOHIDElementTypeCollection && IOHIDElementGetParent(tIOHIDElementRef) == 0) + if (type == kIOHIDElementTypeCollection && IOHIDElementGetParent(element) == 0) { - int tUsagePage = IOHIDElementGetUsagePage(tIOHIDElementRef); - int tUsage = IOHIDElementGetUsage(tIOHIDElementRef); - - if (tUsagePage == kHIDPage_GenericDesktop && - (tUsage == kHIDUsage_GD_Joystick || tUsage == kHIDUsage_GD_GamePad)) + int usage_page = IOHIDElementGetUsagePage(element); + int usage = IOHIDElementGetUsage(element); + + if (usage_page == kHIDPage_GenericDesktop && + (usage == kHIDUsage_GD_Joystick || usage == kHIDUsage_GD_GamePad)) { - CFArrayAppendValue((CFMutableArrayRef)topLevels, tIOHIDElementRef); - numTops++; + CFArrayAppendValue(main_elements, element); + total++; } } } - } - return numTops; -} - -static void get_element_children(IOHIDElementRef tElement, CFArrayRef childElements) + CFRelease(elements); + } + + TRACE("-> total %d\n", (int)total); + return total; +} + +static void get_element_children(IOHIDElementRef element, CFMutableArrayRef all_children) { CFIndex idx, cnt; - CFArrayRef tElementChildrenArray = IOHIDElementGetChildren(tElement); - - cnt = CFArrayGetCount(tElementChildrenArray); - if (cnt < 1) - return; + CFArrayRef element_children = IOHIDElementGetChildren(element); + + TRACE("element %s\n", debugstr_element(element)); + + cnt = CFArrayGetCount(element_children); /* Either add the element to the array or grab its children */ for (idx=0; idx<cnt; idx++) { - IOHIDElementRef tChildElementRef; - - tChildElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(tElementChildrenArray, idx); - if (IOHIDElementGetType(tChildElementRef) == kIOHIDElementTypeCollection) - get_element_children(tChildElementRef, childElements); + IOHIDElementRef child; + + child = (IOHIDElementRef)CFArrayGetValueAtIndex(element_children, idx); + TRACE("child %s\n", debugstr_element(child)); + if (IOHIDElementGetType(child) == kIOHIDElementTypeCollection) + get_element_children(child, all_children); else - CFArrayAppendValue((CFMutableArrayRef)childElements, tChildElementRef); + CFArrayAppendValue(all_children, child); } } static int find_osx_devices(void) { - IOReturn tIOReturn; + IOHIDManagerRef hid_manager; CFMutableDictionaryRef result; CFSetRef devset; - CFArrayRef matching; - - gIOHIDManagerRef = IOHIDManagerCreate( kCFAllocatorDefault, 0L ); - tIOReturn = IOHIDManagerOpen( gIOHIDManagerRef, 0L); - if ( kIOReturnSuccess != tIOReturn ) + CFMutableArrayRef matching; + + TRACE("()\n"); + + hid_manager = IOHIDManagerCreate( kCFAllocatorDefault, 0L ); + if (IOHIDManagerOpen( hid_manager, 0 ) != kIOReturnSuccess) { ERR("Couldn't open IOHIDManager.\n"); + CFRelease( hid_manager ); return 0; } @@ -362,68 +426,81 @@ &kCFTypeArrayCallBacks ); /* build matching dictionary */ - result = creates_osx_device_match(kHIDUsage_GD_Joystick); + result = create_osx_device_match(kHIDUsage_GD_Joystick); if (!result) { CFRelease(matching); - return 0; - } - CFArrayAppendValue( ( CFMutableArrayRef )matching, result ); - result = creates_osx_device_match(kHIDUsage_GD_GamePad); + goto fail; + } + CFArrayAppendValue( matching, result ); + CFRelease( result ); + result = create_osx_device_match(kHIDUsage_GD_GamePad); if (!result) { CFRelease(matching); - return 0; - } - CFArrayAppendValue( ( CFMutableArrayRef )matching, result ); - - IOHIDManagerSetDeviceMatchingMultiple( gIOHIDManagerRef, matching); - devset = IOHIDManagerCopyDevices( gIOHIDManagerRef ); + goto fail; + } + CFArrayAppendValue( matching, result ); + CFRelease( result ); + + IOHIDManagerSetDeviceMatchingMultiple( hid_manager, matching); + CFRelease( matching ); + devset = IOHIDManagerCopyDevices( hid_manager ); if (devset) { - CFIndex countDevices, countCollections, idx; - CFArrayRef gDevices = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); - CFSetApplyFunction(devset, CFSetApplierFunctionCopyToCFArray, (void*)gDevices); + CFIndex num_devices, num_main_elements, idx; + CFMutableArrayRef devices = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + CFSetApplyFunction(devset, CFSetApplierFunctionCopyToCFArray, devices); CFRelease( devset); - countDevices = CFArrayGetCount(gDevices); - - gCollections = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); - if (!gCollections) - return 0; - - countCollections = 0; - for (idx = 0; idx < countDevices; idx++) + num_devices = CFArrayGetCount(devices); + + device_main_elements = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + if (!device_main_elements) { - CFIndex tTop; - IOHIDDeviceRef tDevice; - - tDevice = (IOHIDDeviceRef) CFArrayGetValueAtIndex(gDevices, idx); - tTop = find_top_level(tDevice, gCollections); - countCollections += tTop; + CFRelease( devices ); + goto fail; } - CFRelease(gDevices); - - TRACE("found %i device(s), %i collection(s)\n",(int)countDevices,(int)countCollections); - return (int)countCollections; - } + num_main_elements = 0; + for (idx = 0; idx < num_devices; idx++) + { + CFIndex top; + IOHIDDeviceRef hid_device; + + hid_device = (IOHIDDeviceRef) CFArrayGetValueAtIndex(devices, idx); + TRACE("hid_device %s\n", debugstr_device(hid_device)); + top = find_top_level(hid_device, device_main_elements); + num_main_elements += top; + } + + CFRelease(devices); + + TRACE("found %i device(s), %i collection(s)\n",(int)num_devices,(int)num_main_elements); + return (int)num_main_elements; + } + +fail: + IOHIDManagerClose( hid_manager, 0 ); + CFRelease( hid_manager ); return 0; } static int get_osx_device_name(int id, char *name, int length) { CFStringRef str; - IOHIDDeviceRef tIOHIDDeviceRef; - - tIOHIDDeviceRef = get_device_ref(id); + IOHIDDeviceRef hid_device; + + hid_device = get_device_ref(id); + + TRACE("id %d hid_device %s\n", id, debugstr_device(hid_device)); if (name) name[0] = 0; - if (!tIOHIDDeviceRef) + if (!hid_device) return 0; - str = IOHIDDeviceGetProperty(tIOHIDDeviceRef, CFSTR( kIOHIDProductKey )); + str = IOHIDDeviceGetProperty(hid_device, CFSTR( kIOHIDProductKey )); if (str) { CFIndex len = CFStringGetLength(str); @@ -438,92 +515,84 @@ return 0; } -static void insert_sort_button(int header, IOHIDElementRef tIOHIDElementRef, - CFMutableArrayRef elementCFArrayRef, int index, - int target) -{ - IOHIDElementRef targetElement; - int usage; - - CFArraySetValueAtIndex(elementCFArrayRef, header+index, NULL); - targetElement = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elementCFArrayRef, header+target); - if (targetElement == NULL) - { - CFArraySetValueAtIndex(elementCFArrayRef, header+target,tIOHIDElementRef); +static CFComparisonResult button_usage_comparator(const void *val1, const void *val2, void *context) +{ + IOHIDElementRef element1 = (IOHIDElementRef)val1, element2 = (IOHIDElementRef)val2; + int usage1 = IOHIDElementGetUsage(element1), usage2 = IOHIDElementGetUsage(element2); + + if (usage1 < usage2) + return kCFCompareLessThan; + if (usage1 > usage2) + return kCFCompareGreaterThan; + return kCFCompareEqualTo; +} + +static void get_osx_device_elements(JoystickImpl *device, int axis_map[8]) +{ + IOHIDElementRef device_main_element; + CFMutableArrayRef elements; + DWORD sliders = 0; + + TRACE("device %p device->id %d\n", device, device->id); + + device->elements = NULL; + + if (!device_main_elements || device->id >= CFArrayGetCount(device_main_elements)) return; - } - usage = IOHIDElementGetUsage( targetElement ); - usage --; /* usage 1 based index */ - - insert_sort_button(header, targetElement, elementCFArrayRef, target, usage); - CFArraySetValueAtIndex(elementCFArrayRef, header+target,tIOHIDElementRef); -} - -static void get_osx_device_elements(JoystickImpl *device, int axis_map[8]) -{ - IOHIDElementRef tIOHIDElementRef; - CFArrayRef gElementCFArrayRef; - DWORD axes = 0; - DWORD sliders = 0; - DWORD buttons = 0; - DWORD povs = 0; - - device->elementCFArrayRef = NULL; - - if (!gCollections) + + device_main_element = (IOHIDElementRef)CFArrayGetValueAtIndex(device_main_elements, device->id); + TRACE("device_main_element %s\n", debugstr_element(device_main_element)); + if (!device_main_element) return; - tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, device->id); - - if (!tIOHIDElementRef) - return; - - gElementCFArrayRef = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); - get_element_children(tIOHIDElementRef, gElementCFArrayRef); - - if (gElementCFArrayRef) - { - CFIndex idx, cnt = CFArrayGetCount( gElementCFArrayRef ); - /* build our element array in the order that dinput expects */ - device->elementCFArrayRef = CFArrayCreateMutable(NULL,0,NULL); + elements = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + get_element_children(device_main_element, elements); + + if (elements) + { + CFIndex idx, cnt = CFArrayGetCount( elements ); + CFMutableArrayRef axes = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + CFMutableArrayRef buttons = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + CFMutableArrayRef povs = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); for ( idx = 0; idx < cnt; idx++ ) { - IOHIDElementRef tIOHIDElementRef = ( IOHIDElementRef ) CFArrayGetValueAtIndex( gElementCFArrayRef, idx ); - int eleType = IOHIDElementGetType( tIOHIDElementRef ); - switch(eleType) + IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elements, idx ); + int type = IOHIDElementGetType( element ); + + TRACE("element %s\n", debugstr_element(element)); + + switch(type) { case kIOHIDElementTypeInput_Button: { - int usagePage = IOHIDElementGetUsagePage( tIOHIDElementRef ); - if (usagePage != kHIDPage_Button) + int usage_page = IOHIDElementGetUsagePage( element ); + TRACE("kIOHIDElementTypeInput_Button usage_page %d\n", usage_page); + if (usage_page != kHIDPage_Button) { /* avoid strange elements found on the 360 controller */ continue; } - if (buttons < 128) - { - CFArrayInsertValueAtIndex(device->elementCFArrayRef, (axes+povs+buttons), tIOHIDElementRef); - buttons++; - } + if (CFArrayGetCount(buttons) < 128) + CFArrayAppendValue(buttons, element); break; } case kIOHIDElementTypeInput_Axis: { - CFArrayInsertValueAtIndex(device->elementCFArrayRef, axes, tIOHIDElementRef); - axes++; + TRACE("kIOHIDElementTypeInput_Axis\n"); + CFArrayAppendValue(axes, element); break; } case kIOHIDElementTypeInput_Misc: { - uint32_t usage = IOHIDElementGetUsage( tIOHIDElementRef ); + uint32_t usage = IOHIDElementGetUsage( element ); switch(usage) { case kHIDUsage_GD_Hatswitch: { - CFArrayInsertValueAtIndex(device->elementCFArrayRef, (axes+povs), tIOHIDElementRef); - povs++; + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Hatswitch\n"); + CFArrayAppendValue(povs, element); break; } case kHIDUsage_GD_Slider: @@ -538,53 +607,65 @@ case kHIDUsage_GD_Ry: case kHIDUsage_GD_Rz: { - CFArrayInsertValueAtIndex(device->elementCFArrayRef, axes, tIOHIDElementRef); - axis_map[axes]=usage; - axes++; + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_* (%d)\n", usage); + axis_map[CFArrayGetCount(axes)]=usage; + CFArrayAppendValue(axes, element); break; } default: - FIXME("Unhandled usage %i\n",usage); + FIXME("kIOHIDElementTypeInput_Misc / Unhandled usage %i\n", usage); } break; } default: - FIXME("Unhandled type %i\n",eleType); + FIXME("Unhandled type %i\n",type); } } - } - - device->generic.devcaps.dwAxes = axes; - device->generic.devcaps.dwButtons = buttons; - device->generic.devcaps.dwPOVs = povs; - - /* Sort buttons into correct order */ - for (buttons = 0; buttons < device->generic.devcaps.dwButtons; buttons++) - { - IOHIDElementRef tIOHIDElementRef = ( IOHIDElementRef ) CFArrayGetValueAtIndex( device->elementCFArrayRef, axes+povs+buttons); - uint32_t usage = IOHIDElementGetUsage( tIOHIDElementRef ); - usage --; /* usage is 1 indexed we need 0 indexed */ - if (usage == buttons) - continue; - - insert_sort_button(axes+povs, tIOHIDElementRef, device->elementCFArrayRef,buttons,usage); + + /* Sort buttons into correct order */ + CFArraySortValues(buttons, CFRangeMake(0, CFArrayGetCount(buttons)), button_usage_comparator, NULL); + + device->generic.devcaps.dwAxes = CFArrayGetCount(axes); + device->generic.devcaps.dwButtons = CFArrayGetCount(buttons); + device->generic.devcaps.dwPOVs = CFArrayGetCount(povs); + + TRACE("axes %u povs %u buttons %u\n", device->generic.devcaps.dwAxes, device->generic.devcaps.dwPOVs, + device->generic.devcaps.dwButtons); + + /* build our element array in the order that dinput expects */ + CFArrayAppendArray(axes, povs, CFRangeMake(0, device->generic.devcaps.dwPOVs)); + CFArrayAppendArray(axes, buttons, CFRangeMake(0, device->generic.devcaps.dwButtons)); + device->elements = axes; + axes = NULL; + + CFRelease(povs); + CFRelease(buttons); + CFRelease(elements); + } + else + { + device->generic.devcaps.dwAxes = 0; + device->generic.devcaps.dwButtons = 0; + device->generic.devcaps.dwPOVs = 0; } } static void get_osx_device_elements_props(JoystickImpl *device) { - CFArrayRef gElementCFArrayRef = device->elementCFArrayRef; - - if (gElementCFArrayRef) - { - CFIndex idx, cnt = CFArrayGetCount( gElementCFArrayRef ); + TRACE("device %p\n", device); + + if (device->elements) + { + CFIndex idx, cnt = CFArrayGetCount( device->elements ); for ( idx = 0; idx < cnt; idx++ ) { - IOHIDElementRef tIOHIDElementRef = ( IOHIDElementRef ) CFArrayGetValueAtIndex( gElementCFArrayRef, idx ); - - device->generic.props[idx].lDevMin = IOHIDElementGetLogicalMin(tIOHIDElementRef); - device->generic.props[idx].lDevMax = IOHIDElementGetLogicalMax(tIOHIDElementRef); + IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( device->elements, idx ); + + TRACE("element %s\n", debugstr_element(element)); + + device->generic.props[idx].lDevMin = IOHIDElementGetLogicalMin(element); + device->generic.props[idx].lDevMax = IOHIDElementGetLogicalMax(element); device->generic.props[idx].lMin = 0; device->generic.props[idx].lMax = 0xffff; device->generic.props[idx].lDeadZone = 0; @@ -596,46 +677,49 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface) { JoystickImpl *device = impl_from_IDirectInputDevice8A(iface); - IOHIDElementRef tIOHIDTopElementRef; - IOHIDDeviceRef tIOHIDDeviceRef; - CFArrayRef gElementCFArrayRef = device->elementCFArrayRef; - - TRACE("polling device %i\n",device->id); - - if (!gCollections) + IOHIDElementRef device_main_element; + IOHIDDeviceRef hid_device; + + TRACE("device %p device->id %i\n", device, device->id); + + if (!device_main_elements || device->id >= CFArrayGetCount(device_main_elements)) return; - tIOHIDTopElementRef = (IOHIDElementRef) CFArrayGetValueAtIndex(gCollections, device->id); - tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDTopElementRef); - - if (!tIOHIDDeviceRef) + device_main_element = (IOHIDElementRef) CFArrayGetValueAtIndex(device_main_elements, device->id); + hid_device = IOHIDElementGetDevice(device_main_element); + TRACE("main element %s hid_device %s\n", debugstr_element(device_main_element), debugstr_device(hid_device)); + if (!hid_device) return; - if (gElementCFArrayRef) + if (device->elements) { int button_idx = 0; int pov_idx = 0; int slider_idx = 0; int inst_id; - CFIndex idx, cnt = CFArrayGetCount( gElementCFArrayRef ); + CFIndex idx, cnt = CFArrayGetCount( device->elements ); for ( idx = 0; idx < cnt; idx++ ) { IOHIDValueRef valueRef; int val, oldVal, newVal; - IOHIDElementRef tIOHIDElementRef = ( IOHIDElementRef ) CFArrayGetValueAtIndex( gElementCFArrayRef, idx ); - int eleType = IOHIDElementGetType( tIOHIDElementRef ); - - switch(eleType) + IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( device->elements, idx ); + int type = IOHIDElementGetType( element ); + + TRACE("element %s\n", debugstr_element(element)); + + switch(type) { case kIOHIDElementTypeInput_Button: + TRACE("kIOHIDElementTypeInput_Button\n"); if(button_idx < 128) { - IOHIDDeviceGetValue(tIOHIDDeviceRef, tIOHIDElementRef, &valueRef); + IOHIDDeviceGetValue(hid_device, element, &valueRef); val = IOHIDValueGetIntegerValue(valueRef); newVal = val ? 0x80 : 0x0; oldVal = device->generic.js.rgbButtons[button_idx]; device->generic.js.rgbButtons[button_idx] = newVal; + TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal); if (oldVal != newVal) { inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON; @@ -646,12 +730,13 @@ break; case kIOHIDElementTypeInput_Misc: { - uint32_t usage = IOHIDElementGetUsage( tIOHIDElementRef ); + uint32_t usage = IOHIDElementGetUsage( element ); switch(usage) { case kHIDUsage_GD_Hatswitch: { - IOHIDDeviceGetValue(tIOHIDDeviceRef, tIOHIDElementRef, &valueRef); + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Hatswitch\n"); + IOHIDDeviceGetValue(hid_device, element, &valueRef); val = IOHIDValueGetIntegerValue(valueRef); oldVal = device->generic.js.rgdwPOV[pov_idx]; if (val >= 8) @@ -659,6 +744,7 @@ else newVal = val * 4500; device->generic.js.rgdwPOV[pov_idx] = newVal; + TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal); if (oldVal != newVal) { inst_id = DIDFT_MAKEINSTANCE(pov_idx) | DIDFT_POV; @@ -677,48 +763,56 @@ { int wine_obj = -1; - IOHIDDeviceGetValue(tIOHIDDeviceRef, tIOHIDElementRef, &valueRef); + IOHIDDeviceGetValue(hid_device, element, &valueRef); val = IOHIDValueGetIntegerValue(valueRef); newVal = joystick_map_axis(&device->generic.props[idx], val); switch (usage) { case kHIDUsage_GD_X: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_X\n"); wine_obj = 0; oldVal = device->generic.js.lX; device->generic.js.lX = newVal; break; case kHIDUsage_GD_Y: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Y\n"); wine_obj = 1; oldVal = device->generic.js.lY; device->generic.js.lY = newVal; break; case kHIDUsage_GD_Z: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Z\n"); wine_obj = 2; oldVal = device->generic.js.lZ; device->generic.js.lZ = newVal; break; case kHIDUsage_GD_Rx: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Rx\n"); wine_obj = 3; oldVal = device->generic.js.lRx; device->generic.js.lRx = newVal; break; case kHIDUsage_GD_Ry: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Ry\n"); wine_obj = 4; oldVal = device->generic.js.lRy; device->generic.js.lRy = newVal; break; case kHIDUsage_GD_Rz: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Rz\n"); wine_obj = 5; oldVal = device->generic.js.lRz; device->generic.js.lRz = newVal; break; case kHIDUsage_GD_Slider: + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Slider\n"); wine_obj = 6 + slider_idx; oldVal = device->generic.js.rglSlider[slider_idx]; device->generic.js.rglSlider[slider_idx] = newVal; slider_idx ++; break; } + TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal); if ((wine_obj != -1) && (oldVal != newVal)) { @@ -729,12 +823,12 @@ break; } default: - FIXME("unhandled usage %i\n",usage); + FIXME("kIOHIDElementTypeInput_Misc / unhandled usage %i\n", usage); } break; } default: - FIXME("Unhandled type %i\n",eleType); + FIXME("Unhandled type %i\n",type); } } } @@ -753,6 +847,8 @@ static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { + TRACE("dwDevType %u dwFlags 0x%08x version 0x%04x id %d\n", dwDevType, dwFlags, version, id); + if (id >= find_joystick_devices()) return E_FAIL; if ((dwDevType == 0) || @@ -791,6 +887,8 @@ { char name[MAX_PATH]; char friendly[32]; + + TRACE("dwDevType %u dwFlags 0x%08x version 0x%04x id %d\n", dwDevType, dwFlags, version, id); if (id >= find_joystick_devices()) return E_FAIL; @@ -841,13 +939,13 @@ return ret; } -static int osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis) +static BOOL osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis) { int i; for(i = 0; i < ffcaps->numFfAxes; ++i) if(ffcaps->ffAxes[i] == axis) - return 1; - return 0; + return TRUE; + return FALSE; } static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, @@ -948,7 +1046,8 @@ for (i = 0; i < newDevice->generic.devcaps.dwAxes; i++) { - int wine_obj = -1, has_ff = 0; + int wine_obj = -1; + BOOL has_ff = FALSE; switch (axis_map[i]) { case kHIDUsage_GD_X: @@ -1026,6 +1125,7 @@ newDevice->generic.devcaps.dwFFDriverVersion = 0; if (TRACE_ON(dinput)) { + TRACE("allocated device %p\n", newDevice); _dump_DIDATAFORMAT(newDevice->generic.base.data_format.wine_df); _dump_DIDEVCAPS(&newDevice->generic.devcaps); } @@ -1036,6 +1136,8 @@ FAILED: hr = DIERR_OUTOFMEMORY; + if (newDevice->ff) FFReleaseDevice(newDevice->ff); + if (newDevice->elements) CFRelease(newDevice->elements); if (df) HeapFree(GetProcessHeap(), 0, df->rgodf); HeapFree(GetProcessHeap(), 0, df); release_DataFormat(&newDevice->generic.base.data_format); Modified: trunk/reactos/dll/directx/wine/dinput/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/ke…
============================================================================== --- trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] Sat Apr 19 23:43:51 2014 @@ -110,7 +110,7 @@ EnterCriticalSection(&This->base.crit); queue_event(iface, DIDFT_MAKEINSTANCE(dik_code) | DIDFT_PSHBUTTON, - new_diks, hook->time, This->base.dinput->evsequence++); + new_diks, GetCurrentTime(), This->base.dinput->evsequence++); LeaveCriticalSection(&This->base.crit); return ret; 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] Sat Apr 19 23:43:51 2014 @@ -35,7 +35,7 @@ reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.17 reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.17 reactos/dll/directx/wine/devenum # Synced to Wine-1.7.17 -reactos/dll/directx/wine/dinput # Synced to Wine-1.7.1 +reactos/dll/directx/wine/dinput # Synced to Wine-1.7.17 reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.1 reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.1 reactos/dll/directx/wine/dplay # Synced to Wine-1.7.1
10 years, 8 months
1
0
0
0
[hbelusca] 62823: [SOLITAIRE][RAPPS][MSGINA] Polish translation of solitaire, rapps and msgina Patch by Wojciech Kozłowski and Adam Stachowicz. Thanks a lot! CORE-8068 #resolve #comment Second patc...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Apr 19 23:18:29 2014 New Revision: 62823 URL:
http://svn.reactos.org/svn/reactos?rev=62823&view=rev
Log: [SOLITAIRE][RAPPS][MSGINA] Polish translation of solitaire, rapps and msgina Patch by Wojciech Kozłowski and Adam Stachowicz. Thanks a lot! CORE-8068 #resolve #comment Second patch committed in revision 62823, thanks ;) Modified: trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc trunk/reactos/base/applications/rapps/lang/pl-PL.rc trunk/reactos/dll/win32/msgina/lang/pl-PL.rc Modified: trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
============================================================================== --- trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc [iso-8859-1] Sat Apr 19 23:18:29 2014 @@ -5,6 +5,7 @@ * Updated by Caemyr (olaf_siejka(a)o2.pl), Nov, 2008 * Updated by Saibamen - Adam Stachowicz (saibamenppl(a)gmail.com) (Apr, 2011) * UTF-8 conversion by Caemyr (May, 2011) + * updated by Wojciech KozÅowski (wojo664(a)gmail.com) (April, 2014) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -19,13 +20,13 @@ GROUPBOX "Karty", -1, 7, 7, 90, 40 AUTORADIOBUTTON "Rozdaj &jednÄ ", IDC_OPT_DRAWONE, 14, 19, 70, 10, WS_GROUP | WS_TABSTOP AUTORADIOBUTTON "Rozdaj &dwie", IDC_OPT_DRAWTHREE, 14, 32, 70, 10 - GROUPBOX "Scoring", -1, 100, 7, 75, 53 - AUTORADIOBUTTON "&Standard", IDC_OPT_STANDARD, 107, 19, 60, 10, WS_GROUP | WS_TABSTOP + GROUPBOX "Punktowanie", -1, 100, 7, 75, 53 + AUTORADIOBUTTON "&Standardowe", IDC_OPT_STANDARD, 107, 19, 60, 10, WS_GROUP | WS_TABSTOP AUTORADIOBUTTON "&Vegas", IDC_OPT_VEGAS, 107, 32, 60, 10 - AUTORADIOBUTTON "&None", IDC_OPT_NOSCORE, 107, 45, 60, 10 + AUTORADIOBUTTON "&Brak", IDC_OPT_NOSCORE, 107, 45, 60, 10 AUTOCHECKBOX "&Pokazuj czas gry", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP AUTOCHECKBOX "Pokazuj pa&sek stanu", IDC_OPT_STATUSBAR, 7, 66, 77, 10, WS_TABSTOP - AUTOCHECKBOX "&Keep Score", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP + AUTOCHECKBOX "PamiÄtaj punkty", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 101, 97, 50, 14 END @@ -56,12 +57,12 @@ STRINGTABLE BEGIN IDS_SOL_NAME "Pasjans" - IDS_SOL_ABOUT "Pasjans by J. Brown\n\nCardLib version 1.0." + IDS_SOL_ABOUT "Pasjans - autor: J. Brown\n\nCardLib wersja 1.0." IDS_SOL_QUIT "ZakoÅczyÄ aktualnÄ grÄ?" IDS_SOL_WIN "Gratulacje, wygraÅeÅ!" IDS_SOL_DEAL "Nowe rozdanie?" - IDS_SOL_SCORE "Score: %d" - IDS_SOL_TIME "Time: %d" + IDS_SOL_SCORE "Wynik: %d" + IDS_SOL_TIME "Czas: %d" END /* Menus */ Modified: trunk/reactos/base/applications/rapps/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
============================================================================== --- trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] Sat Apr 19 23:18:29 2014 @@ -26,7 +26,7 @@ MENUITEM SEPARATOR MENUITEM "O&dÅwież", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Aktualizuj ba&zÄ pogramów", ID_RESETDB + MENUITEM "Ak&tualizuj bazÄ programów", ID_RESETDB END POPUP "Pomoc" BEGIN @@ -56,7 +56,7 @@ MENUITEM SEPARATOR MENUITEM "&OdÅwież", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Aktualizuj ba&zÄ pogramów", ID_RESETDB + MENUITEM "Ak&tualizuj bazÄ programów", ID_RESETDB END END Modified: trunk/reactos/dll/win32/msgina/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/pl-P…
============================================================================== --- trunk/reactos/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] Sat Apr 19 23:18:29 2014 @@ -3,8 +3,8 @@ * testament(a)users.sourceforge.net *
https://sourceforge.net/projects/reactospl
* UTF-8 conversion by Caemyr (May, 2011) - * Updated by Saibamen - Adam Stachowicz (saibamenppl(a)gmail.com) (November, 2013) - * Updated by wojo664 - Wojtek Kozlowski (wojo664(a)gmail.com, wojtekkozlo664(a)op.pl) (April 2014) + * Updated by Saibamen - Adam Stachowicz (saibamenppl(a)gmail.com) (April, 2014) + * Updated by wojo664 - Wojtek KozÅowski (wojo664(a)gmail.com, wojtekkozlo664(a)op.pl) (April, 2014) */ @@ -158,12 +158,11 @@ IDS_LOGONTITLE "Logowanie - wiadomoÅÄ" IDS_LOGONWRONGUSERORPWD "Logowanie w systemie nie jest możliwe. Upewnij siÄ, że nazwa użytkownika i domena jest poprawna, a nastÄpnie wpisz ponownie hasÅo. WielkoÅÄ liter w haÅle ma znaczenie." IDS_LOGONUSERDISABLED "Twoje konto zostaÅo wyÅÄ czone. Skontaktuj siÄ z administratorem systemu." - IDS_PASSWORDMUSTCHANGE "You are required to change your password at first logon." - IDS_PASSWORDEXPIRED "Your password has expired and must be changed." + IDS_PASSWORDMUSTCHANGE "JesteÅ zobowiÄ zany do zmiany hasÅa przy pierwszym logowaniu." + IDS_PASSWORDEXPIRED "Twoje hasÅo wygasÅo i musi zostaÄ zmienione." END -/* Shutdown Dialog Strings */ -STRINGTABLE +/* Shutdown Dialog Strings */STRINGTABLE BEGIN IDS_SHUTDOWN_LOGOFF "Wyloguj ""%s""" IDS_SHUTDOWN_SHUTDOWN "WyÅÄ cz"
10 years, 8 months
1
0
0
0
[akhaldi] 62822: [DEVENUM_WINETEST] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 19:30:34 2014 New Revision: 62822 URL:
http://svn.reactos.org/svn/reactos?rev=62822&view=rev
Log: [DEVENUM_WINETEST] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/rostests/winetests/devenum/devenum.c Modified: trunk/rostests/winetests/devenum/devenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/devenum/devenum…
============================================================================== --- trunk/rostests/winetests/devenum/devenum.c [iso-8859-1] (original) +++ trunk/rostests/winetests/devenum/devenum.c [iso-8859-1] Sat Apr 19 19:30:34 2014 @@ -34,6 +34,8 @@ #include <uuids.h> static const WCHAR friendly_name[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; +static const WCHAR fcc_handlerW[] = {'F','c','c','H','a','n','d','l','e','r',0}; +static const WCHAR mrleW[] = {'m','r','l','e',0}; struct category { @@ -57,6 +59,7 @@ HRESULT res; ICreateDevEnum* create_devenum; IEnumMoniker* enum_moniker = NULL; + BOOL have_mrle = FALSE; int i; res = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, @@ -101,6 +104,17 @@ { trace(" ???\n"); } + + if (IsEqualGUID(&CLSID_VideoCompressorCategory, am_categories[i].clsid)) { + /* Test well known compressor to ensure that we really enumerate codecs */ + hr = IPropertyBag_Read(prop_bag, fcc_handlerW, &var, NULL); + if (SUCCEEDED(hr)) { + ok(V_VT(&var) == VT_BSTR, "V_VT(var) = %d\n", V_VT(&var)); + if(!lstrcmpW(V_BSTR(&var), mrleW)) + have_mrle = TRUE; + VariantClear(&var); + } + } } if (prop_bag) @@ -112,6 +126,10 @@ } ICreateDevEnum_Release(create_devenum); + + /* 64-bit windows are missing mrle codec */ + if(sizeof(void*) == 4) + ok(have_mrle, "mrle codec not found\n"); } /* CLSID_CDeviceMoniker */
10 years, 8 months
1
0
0
0
[akhaldi] 62821: [DEVENUM] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 19:30:15 2014 New Revision: 62821 URL:
http://svn.reactos.org/svn/reactos?rev=62821&view=rev
Log: [DEVENUM] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/directx/wine/devenum/CMakeLists.txt trunk/reactos/dll/directx/wine/devenum/createdevenum.c trunk/reactos/dll/directx/wine/devenum/devenum_classes.idl trunk/reactos/dll/directx/wine/devenum/devenum_private.h trunk/reactos/dll/directx/wine/devenum/mediacatenum.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/devenum/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/C…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/CMakeLists.txt [iso-8859-1] Sat Apr 19 19:30:15 2014 @@ -23,5 +23,6 @@ set_module_type(devenum win32dll UNICODE) target_link_libraries(devenum strmiids uuid wine) add_importlibs(devenum advapi32 ole32 oleaut32 winmm user32 avicap32 msvcrt kernel32 ntdll) +add_delay_importlibs(devenum msvfw32) add_pch(devenum devenum_private.h SOURCE) add_cd_file(TARGET devenum DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/directx/wine/devenum/createdevenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/c…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/createdevenum.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/createdevenum.c [iso-8859-1] Sat Apr 19 19:30:15 2014 @@ -26,12 +26,13 @@ #include "devenum_private.h" #include <vfw.h> +#include <aviriff.h> #include "resource.h" extern HINSTANCE DEVENUM_hInstance; -const WCHAR wszInstanceKeyName[] ={'I','n','s','t','a','n','c','e',0}; +const WCHAR wszInstanceKeyName[] ={'\\','I','n','s','t','a','n','c','e',0}; static const WCHAR wszRegSeparator[] = {'\\', 0 }; static const WCHAR wszActiveMovieKey[] = {'S','o','f','t','w','a','r','e','\\', @@ -101,12 +102,18 @@ return 1; /* non-heap based object */ } +static BOOL IsSpecialCategory(const CLSID *clsid) +{ + return IsEqualGUID(clsid, &CLSID_AudioRendererCategory) || + IsEqualGUID(clsid, &CLSID_AudioInputDeviceCategory) || + IsEqualGUID(clsid, &CLSID_VideoInputDeviceCategory) || + IsEqualGUID(clsid, &CLSID_VideoCompressorCategory) || + IsEqualGUID(clsid, &CLSID_MidiRendererCategory); +} + HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen) { - if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) + if (IsSpecialCategory(clsidDeviceClass)) { *pBaseKey = HKEY_CURRENT_USER; strcpyW(wszRegKeyName, wszActiveMovieKey); @@ -123,11 +130,55 @@ if (!StringFromGUID2(clsidDeviceClass, wszRegKeyName + CLSID_STR_LEN, maxLen - CLSID_STR_LEN)) return E_OUTOFMEMORY; - strcatW(wszRegKeyName, wszRegSeparator); strcatW(wszRegKeyName, wszInstanceKeyName); } return S_OK; +} + +static HKEY open_category_key(const CLSID *clsid) +{ + WCHAR key_name[sizeof(wszInstanceKeyName)/sizeof(WCHAR) + CHARS_IN_GUID-1 + 6 /* strlen("CLSID\") */], *ptr; + HKEY ret; + + strcpyW(key_name, clsid_keyname); + ptr = key_name + strlenW(key_name); + *ptr++ = '\\'; + + if (!StringFromGUID2(clsid, ptr, CHARS_IN_GUID)) + return NULL; + + ptr += strlenW(ptr); + strcpyW(ptr, wszInstanceKeyName); + + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &ret) != ERROR_SUCCESS) { + WARN("Could not open %s\n", debugstr_w(key_name)); + return NULL; + } + + return ret; +} + +static HKEY open_special_category_key(const CLSID *clsid, BOOL create) +{ + WCHAR key_name[sizeof(wszActiveMovieKey)/sizeof(WCHAR) + CHARS_IN_GUID-1]; + HKEY ret; + LONG res; + + strcpyW(key_name, wszActiveMovieKey); + if (!StringFromGUID2(clsid, key_name + sizeof(wszActiveMovieKey)/sizeof(WCHAR)-1, CHARS_IN_GUID)) + return NULL; + + if(create) + res = RegCreateKeyW(HKEY_CURRENT_USER, key_name, &ret); + else + res = RegOpenKeyExW(HKEY_CURRENT_USER, key_name, 0, KEY_READ, &ret); + if (res != ERROR_SUCCESS) { + WARN("Could not open %s\n", debugstr_w(key_name)); + return NULL; + } + + return ret; } static void DEVENUM_ReadPinTypes(HKEY hkeyPinKey, REGFILTERPINS *rgPin) @@ -455,9 +506,7 @@ IEnumMoniker **ppEnumMoniker, DWORD dwFlags) { - WCHAR wszRegKey[MAX_PATH]; - HKEY hkey; - HKEY hbasekey; + HKEY hkey, special_hkey = NULL; HRESULT hr; TRACE("(%p)->(%s, %p, %x)\n", iface, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags); @@ -472,32 +521,29 @@ DEVENUM_RegisterLegacyAmFilters(); } - hr = DEVENUM_GetCategoryKey(clsidDeviceClass, &hbasekey, wszRegKey, MAX_PATH); - if (FAILED(hr)) - return hr; - - if (IsEqualGUID(clsidDeviceClass, &CLSID_AudioRendererCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_AudioInputDeviceCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_VideoInputDeviceCategory) || - IsEqualGUID(clsidDeviceClass, &CLSID_MidiRendererCategory)) + if (IsSpecialCategory(clsidDeviceClass)) { hr = DEVENUM_CreateSpecialCategories(); if (FAILED(hr)) return hr; - if (RegOpenKeyW(hbasekey, wszRegKey, &hkey) != ERROR_SUCCESS) + + special_hkey = open_special_category_key(clsidDeviceClass, FALSE); + if (!special_hkey) { ERR("Couldn't open registry key for special device: %s\n", debugstr_guid(clsidDeviceClass)); return S_FALSE; } } - else if (RegOpenKeyW(hbasekey, wszRegKey, &hkey) != ERROR_SUCCESS) + + hkey = open_category_key(clsidDeviceClass); + if (!hkey && !special_hkey) { FIXME("Category %s not found\n", debugstr_guid(clsidDeviceClass)); return S_FALSE; } - return DEVENUM_IEnumMoniker_Construct(hkey, ppEnumMoniker); + return DEVENUM_IEnumMoniker_Construct(hkey, special_hkey, ppEnumMoniker); } /********************************************************************** @@ -546,6 +592,44 @@ ERR("Failed to create key HKEY_CURRENT_USER\\%s\n", debugstr_w(wszRegKey)); return res; +} + +static void register_vfw_codecs(void) +{ + WCHAR avico_clsid_str[CHARS_IN_GUID]; + HKEY basekey, key; + ICINFO icinfo; + DWORD i, res; + + static const WCHAR CLSIDW[] = {'C','L','S','I','D',0}; + static const WCHAR FccHandlerW[] = {'F','c','c','H','a','n','d','l','e','r',0}; + static const WCHAR FriendlyNameW[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; + + StringFromGUID2(&CLSID_AVICo, avico_clsid_str, sizeof(avico_clsid_str)/sizeof(WCHAR)); + + basekey = open_special_category_key(&CLSID_VideoCompressorCategory, TRUE); + if(!basekey) { + ERR("Could not create key\n"); + return; + } + + for(i=0; ICInfo(FCC('v','i','d','c'), i, &icinfo); i++) { + WCHAR fcc_str[5] = {LOBYTE(LOWORD(icinfo.fccHandler)), HIBYTE(LOWORD(icinfo.fccHandler)), + LOBYTE(HIWORD(icinfo.fccHandler)), HIBYTE(HIWORD(icinfo.fccHandler))}; + + res = RegCreateKeyW(basekey, fcc_str, &key); + if(res != ERROR_SUCCESS) + continue; + + RegSetValueExW(key, CLSIDW, 0, REG_SZ, (const BYTE*)avico_clsid_str, sizeof(avico_clsid_str)); + RegSetValueExW(key, FccHandlerW, 0, REG_SZ, (const BYTE*)fcc_str, sizeof(fcc_str)); + RegSetValueExW(key, FriendlyNameW, 0, REG_SZ, (const BYTE*)icinfo.szName, (strlenW(icinfo.szName)+1)*sizeof(WCHAR)); + /* FIXME: Set ClassManagerFlags and FilterData values */ + + RegCloseKey(key); + } + + RegCloseKey(basekey); } static HANDLE DEVENUM_populate_handle; @@ -597,6 +681,8 @@ if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_VideoInputDeviceCategory, &basekey, path, MAX_PATH))) RegDeleteTreeW(basekey, path); if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_MidiRendererCategory, &basekey, path, MAX_PATH))) + RegDeleteTreeW(basekey, path); + if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_VideoCompressorCategory, &basekey, path, MAX_PATH))) RegDeleteTreeW(basekey, path); rf2.dwVersion = 2; @@ -877,6 +963,9 @@ if (pMapper) IFilterMapper2_Release(pMapper); + + register_vfw_codecs(); + SetEvent(DEVENUM_populate_handle); return res; } Modified: trunk/reactos/dll/directx/wine/devenum/devenum_classes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/d…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/devenum_classes.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/devenum_classes.idl [iso-8859-1] Sat Apr 19 19:30:15 2014 @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#pragma makedep register [ helpstring("System Device Enum"), Modified: trunk/reactos/dll/directx/wine/devenum/devenum_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/d…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/devenum_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/devenum_private.h [iso-8859-1] Sat Apr 19 19:30:15 2014 @@ -77,7 +77,7 @@ } MediaCatMoniker; MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) DECLSPEC_HIDDEN; -HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN; +HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, HKEY special_hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN; extern ClassFactoryImpl DEVENUM_ClassFactory DECLSPEC_HIDDEN; extern ICreateDevEnum DEVENUM_CreateDevEnum DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/directx/wine/devenum/mediacatenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/devenum/m…
============================================================================== --- trunk/reactos/dll/directx/wine/devenum/mediacatenum.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/devenum/mediacatenum.c [iso-8859-1] Sat Apr 19 19:30:15 2014 @@ -32,7 +32,9 @@ IEnumMoniker IEnumMoniker_iface; LONG ref; DWORD index; + DWORD subkey_cnt; HKEY hkey; + HKEY special_hkey; } EnumMonikerImpl; typedef struct @@ -714,6 +716,8 @@ if (!ref) { + if(This->special_hkey) + RegCloseKey(This->special_hkey); RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); @@ -735,7 +739,12 @@ while (fetched < celt) { - res = RegEnumKeyW(This->hkey, This->index, buffer, sizeof(buffer) / sizeof(WCHAR)); + if(This->index+fetched < This->subkey_cnt) + res = RegEnumKeyW(This->hkey, This->index+fetched, buffer, sizeof(buffer) / sizeof(WCHAR)); + else if(This->special_hkey) + res = RegEnumKeyW(This->special_hkey, This->index+fetched-This->subkey_cnt, buffer, sizeof(buffer) / sizeof(WCHAR)); + else + break; if (res != ERROR_SUCCESS) { break; @@ -744,7 +753,8 @@ if (!pMoniker) return E_OUTOFMEMORY; - if (RegOpenKeyW(This->hkey, buffer, &pMoniker->hkey) != ERROR_SUCCESS) + if (RegOpenKeyW(This->index+fetched < This->subkey_cnt ? This->hkey : This->special_hkey, + buffer, &pMoniker->hkey) != ERROR_SUCCESS) { IMoniker_Release(&pMoniker->IMoniker_iface); break; @@ -769,17 +779,16 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Skip(IEnumMoniker *iface, ULONG celt) { EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); - DWORD subKeys; + DWORD special_subkeys = 0; TRACE("(%p)->(%d)\n", iface, celt); /* Before incrementing, check if there are any more values to run through. Some programs use the Skip() function to get the number of devices */ - if(RegQueryInfoKeyW(This->hkey, NULL, NULL, NULL, &subKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) - { - return S_FALSE; - } - if((This->index + celt) >= subKeys) + if(This->special_hkey) + RegQueryInfoKeyW(This->special_hkey, NULL, NULL, NULL, &special_subkeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + + if((This->index + celt) >= This->subkey_cnt + special_subkeys) { return S_FALSE; } @@ -821,7 +830,7 @@ DEVENUM_IEnumMoniker_Clone }; -HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) +HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, HKEY special_hkey, IEnumMoniker ** ppEnumMoniker) { EnumMonikerImpl * pEnumMoniker = CoTaskMemAlloc(sizeof(EnumMonikerImpl)); if (!pEnumMoniker) @@ -831,9 +840,14 @@ pEnumMoniker->ref = 1; pEnumMoniker->index = 0; pEnumMoniker->hkey = hkey; + pEnumMoniker->special_hkey = special_hkey; *ppEnumMoniker = &pEnumMoniker->IEnumMoniker_iface; + if(RegQueryInfoKeyW(pEnumMoniker->hkey, NULL, NULL, NULL, &pEnumMoniker->subkey_cnt, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) + pEnumMoniker->subkey_cnt = 0; + + DEVENUM_LockModule(); return S_OK; 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] Sat Apr 19 19:30:15 2014 @@ -34,7 +34,7 @@ reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.17 reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.17 -reactos/dll/directx/wine/devenum # Synced to Wine-1.7.1 +reactos/dll/directx/wine/devenum # Synced to Wine-1.7.17 reactos/dll/directx/wine/dinput # Synced to Wine-1.7.1 reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.1 reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.1
10 years, 8 months
1
0
0
0
[akhaldi] 62820: [D3DXOF] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 19:13:01 2014 New Revision: 62820 URL:
http://svn.reactos.org/svn/reactos?rev=62820&view=rev
Log: [D3DXOF] * Sync with Wine 1.7.17. CORE-8080 Added: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.rgs (with props) Modified: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c trunk/reactos/dll/directx/wine/d3dxof/d3dxof.idl trunk/reactos/dll/directx/wine/d3dxof/main.c trunk/reactos/dll/directx/wine/d3dxof/parsing.c trunk/reactos/dll/directx/wine/d3dxof/version.rc trunk/reactos/media/doc/README.WINE trunk/reactos/media/inf/syssetup.inf Modified: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/d3…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/d3dxof.c [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -176,7 +176,7 @@ HGLOBAL resource_data; LPDXFILELOADRESOURCE lpdxflr = pvSource; - TRACE("Source in resource (module = %p, name = %s, type = %s\n", lpdxflr->hModule, debugstr_a(lpdxflr->lpName), debugstr_a(lpdxflr->lpType)); + TRACE("Source in resource (module = %p, name = %s, type = %s)\n", lpdxflr->hModule, debugstr_a(lpdxflr->lpName), debugstr_a(lpdxflr->lpType)); resource_info = FindResourceA(lpdxflr->hModule, lpdxflr->lpName, lpdxflr->lpType); if (!resource_info) Modified: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/d3…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/d3dxof.idl [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/d3dxof.idl [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep register + [ helpstring("DirectX File"), threading(both), Added: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/d3…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/d3dxof.rgs (added) +++ trunk/reactos/dll/directx/wine/d3dxof/d3dxof.rgs [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{4516EC43-8F20-11D0-9B6D-0000C0781BC3}' = s 'DirectX File' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + } +} Propchange: trunk/reactos/dll/directx/wine/d3dxof/d3dxof.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/directx/wine/d3dxof/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/ma…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/main.c [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -119,7 +119,7 @@ static HRESULT WINAPI XFCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) { IClassFactoryImpl *This = impl_from_IClassFactory(iface); - FIXME("(%p)->(%d),stub!\n",This,dolock); + FIXME("(%p)->(%d), stub!\n",This,dolock); return S_OK; } Modified: trunk/reactos/dll/directx/wine/d3dxof/parsing.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/pa…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/parsing.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/parsing.c [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -79,7 +79,7 @@ (char)(fourcc >> 16), (char)(fourcc >> 24)); } -static const char* get_primitive_string(WORD token) +static const char* get_primitive_string(DWORD token) { switch(token) { @@ -499,11 +499,11 @@ char tmp[512]; DWORD pos = 0; char c; - BOOL error = 0; + BOOL error = FALSE; while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) { if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_') || (c == '-'))) - error = 1; + error = TRUE; if (pos < sizeof(tmp)) tmp[pos] = c; pos++; @@ -531,7 +531,7 @@ DWORD pos = 0; char c; float decimal; - BOOL dot = 0; + BOOL dot = FALSE; while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) { @@ -591,7 +591,7 @@ char tmp[512]; DWORD pos = 0; char c; - BOOL ok = 0; + BOOL ok = FALSE; if (*buf->buffer != '"') return FALSE; @@ -601,7 +601,7 @@ c = *(buf->buffer+pos+1); if (c == '"') { - ok = 1; + ok = TRUE; break; } if (pos < sizeof(tmp)) @@ -888,10 +888,10 @@ case TOKEN_LPSTR: case TOKEN_UNICODE: case TOKEN_CSTRING: - ret = 1; + ret = TRUE; break; default: - ret = 0; + ret = FALSE; break; } return ret; @@ -937,14 +937,14 @@ while (1) { - BOOL array = 0; + BOOL array = FALSE; int nb_dims = 0; cur_member = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[idx_member]; if (check_TOKEN(buf) == TOKEN_ARRAY) { get_TOKEN(buf); - array = 1; + array = TRUE; } if (check_TOKEN(buf) == TOKEN_NAME) Modified: trunk/reactos/dll/directx/wine/d3dxof/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dxof/ve…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dxof/version.rc [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dxof/version.rc [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -23,4 +23,6 @@ #define WINE_PRODUCTVERSION 5,0,2135,1 #define WINE_PRODUCTVERSION_STR "5.0.2135.1" -#include "wine/wine_common_ver.rc" +1 WINE_REGISTRY d3dxof.rgs + +#include <wine/wine_common_ver.rc> 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] Sat Apr 19 19:13:01 2014 @@ -32,7 +32,7 @@ reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.17 reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.17 -reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.1 +reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.17 reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.17 reactos/dll/directx/wine/devenum # Synced to Wine-1.7.1 reactos/dll/directx/wine/dinput # Synced to Wine-1.7.1 Modified: trunk/reactos/media/inf/syssetup.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/syssetup.inf?rev…
============================================================================== --- trunk/reactos/media/inf/syssetup.inf [iso-8859-1] (original) +++ trunk/reactos/media/inf/syssetup.inf [iso-8859-1] Sat Apr 19 19:13:01 2014 @@ -42,6 +42,7 @@ 11,,comctl32.dll,2 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 +11,,d3dxof.dll,1 11,,ddraw.dll,1 11,,devenum.dll,1 11,,dinput.dll,1
10 years, 8 months
1
0
0
0
[akhaldi] 62819: [D3DX9_36] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 19 18:58:53 2014 New Revision: 62819 URL:
http://svn.reactos.org/svn/reactos?rev=62819&view=rev
Log: [D3DX9_36] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/directx/wine/d3dx9_36/core.c trunk/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_main.c trunk/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_private.h trunk/reactos/dll/directx/wine/d3dx9_36/effect.c trunk/reactos/dll/directx/wine/d3dx9_36/line.c trunk/reactos/dll/directx/wine/d3dx9_36/math.c trunk/reactos/dll/directx/wine/d3dx9_36/mesh.c trunk/reactos/dll/directx/wine/d3dx9_36/render.c trunk/reactos/dll/directx/wine/d3dx9_36/shader.c trunk/reactos/dll/directx/wine/d3dx9_36/skin.c trunk/reactos/dll/directx/wine/d3dx9_36/sprite.c trunk/reactos/dll/directx/wine/d3dx9_36/surface.c trunk/reactos/dll/directx/wine/d3dx9_36/texture.c trunk/reactos/dll/directx/wine/d3dx9_36/util.c trunk/reactos/dll/directx/wine/d3dx9_36/version.rc trunk/reactos/dll/directx/wine/d3dx9_36/volume.c trunk/reactos/dll/directx/wine/d3dx9_36/xfile.c trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/directx/wine/d3dx9_36/core.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/effect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/line.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/math.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/mesh.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/render.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/shader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/skin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/sprite.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/surface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/texture.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/dll/directx/wine/d3dx9_36/xfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
10 years, 8 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200