From a5313181565b67b6be002fb2d7243f858c3741e7 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 8 Mar 2018 13:39:19 +0100 Subject: [PATCH] [DPLAYX] Sync with Wine Staging 3.3. CORE-14434 --- dll/directx/wine/dplayx/CMakeLists.txt | 4 ++-- dll/directx/wine/dplayx/dpclassfactory.c | 19 ++++++++++++++- dll/directx/wine/dplayx/dplay.c | 24 +++++++++++++++++++ dll/directx/wine/dplayx/dplay_global.h | 8 +++++++ dll/directx/wine/dplayx/dplaysp.c | 13 +++++++++- dll/directx/wine/dplayx/dplayx_global.c | 17 +++++++++++++ dll/directx/wine/dplayx/dplayx_global.h | 29 ++++------------------- dll/directx/wine/dplayx/dplayx_main.c | 9 ++++++- dll/directx/wine/dplayx/dplayx_messages.c | 14 +++++++++++ dll/directx/wine/dplayx/dplayx_messages.h | 15 +++++++++--- dll/directx/wine/dplayx/dplayx_queue.h | 5 ++++ dll/directx/wine/dplayx/dplobby.c | 17 +++++++++++++ dll/directx/wine/dplayx/lobbysp.c | 7 +++++- dll/directx/wine/dplayx/lobbysp.h | 9 ++++++- dll/directx/wine/dplayx/name_server.c | 20 ++++++++++++++-- dll/directx/wine/dplayx/name_server.h | 9 +++++++ dll/directx/wine/dplayx/precomp.h | 23 ++++++++++++++++++ media/doc/README.WINE | 2 +- 18 files changed, 206 insertions(+), 38 deletions(-) create mode 100644 dll/directx/wine/dplayx/precomp.h diff --git a/dll/directx/wine/dplayx/CMakeLists.txt b/dll/directx/wine/dplayx/CMakeLists.txt index bf9a7ed46c5..867ba690016 100644 --- a/dll/directx/wine/dplayx/CMakeLists.txt +++ b/dll/directx/wine/dplayx/CMakeLists.txt @@ -16,7 +16,7 @@ list(APPEND SOURCE dplobby.c lobbysp.c name_server.c - dplayx_global.h) + precomp.h) add_library(dplayx SHARED ${SOURCE} @@ -26,5 +26,5 @@ add_library(dplayx SHARED set_module_type(dplayx win32dll) target_link_libraries(dplayx dxguid uuid wine) add_importlibs(dplayx winmm ole32 user32 advapi32 msvcrt kernel32 ntdll) -add_pch(dplayx dplayx_global.h SOURCE) +add_pch(dplayx precomp.h SOURCE) add_cd_file(TARGET dplayx DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/dplayx/dpclassfactory.c b/dll/directx/wine/dplayx/dpclassfactory.c index e2300dd5c22..6accab68d7c 100644 --- a/dll/directx/wine/dplayx/dpclassfactory.c +++ b/dll/directx/wine/dplayx/dpclassfactory.c @@ -17,7 +17,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dplayx_global.h" +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "objbase.h" +#include "winerror.h" +#include "wine/debug.h" +#include "dplay.h" +#include "dplobby.h" +#include "initguid.h" +#include "dplay_global.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); + typedef struct { diff --git a/dll/directx/wine/dplayx/dplay.c b/dll/directx/wine/dplayx/dplay.c index a08c13e600d..fde068138e5 100644 --- a/dll/directx/wine/dplayx/dplay.c +++ b/dll/directx/wine/dplayx/dplay.c @@ -17,7 +17,31 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define COBJMACROS +#include "config.h" +#include "wine/port.h" + +#include +#include + +#define NONAMELESSUNION + +#include "windef.h" +#include "winerror.h" +#include "winbase.h" +#include "winnt.h" +#include "winreg.h" +#include "winnls.h" +#include "wine/unicode.h" +#include "wine/debug.h" + #include "dplayx_global.h" +#include "name_server.h" +#include "dplayx_queue.h" +#include "wine/dplaysp.h" +#include "dplay_global.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* FIXME: Should this be externed? */ extern HRESULT DPL_CreateCompoundAddress diff --git a/dll/directx/wine/dplayx/dplay_global.h b/dll/directx/wine/dplayx/dplay_global.h index f5473d0f435..7def46bc2dd 100644 --- a/dll/directx/wine/dplayx/dplay_global.h +++ b/dll/directx/wine/dplayx/dplay_global.h @@ -19,6 +19,14 @@ #ifndef __WINE_DPLAY_GLOBAL_INCLUDED #define __WINE_DPLAY_GLOBAL_INCLUDED +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/dplaysp.h" +#include "lobbysp.h" +#include "dplayx_queue.h" + extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, DWORD dwAddressSize, LPVOID lpContext ) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/dplayx/dplaysp.c b/dll/directx/wine/dplayx/dplaysp.c index 2322a311d07..43938e8511c 100644 --- a/dll/directx/wine/dplayx/dplaysp.c +++ b/dll/directx/wine/dplayx/dplaysp.c @@ -18,10 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dplayx_global.h" +#include +#include "winerror.h" +#include "wine/debug.h" + +#include "wine/dplaysp.h" +#include "dplay_global.h" +#include "name_server.h" +#include "dplayx_messages.h" + +#include "dplayx_global.h" /* FIXME: For global hack */ /* FIXME: Need to add interface locking inside procedures */ +WINE_DEFAULT_DEBUG_CHANNEL(dplay); + typedef struct IDirectPlaySPImpl { IDirectPlaySP IDirectPlaySP_iface; diff --git a/dll/directx/wine/dplayx/dplayx_global.c b/dll/directx/wine/dplayx/dplayx_global.c index dcc021a6e48..14c53a0c8d4 100644 --- a/dll/directx/wine/dplayx/dplayx_global.c +++ b/dll/directx/wine/dplayx/dplayx_global.c @@ -29,7 +29,24 @@ * */ +#include +#include + +#define NONAMELESSUNION + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "wine/unicode.h" + +#include "wingdi.h" +#include "winuser.h" + #include "dplayx_global.h" +#include "dplayx_messages.h" /* For CreateMessageReceptionThread only */ + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* FIXME: Need to do all that fun other dll referencing type of stuff */ diff --git a/dll/directx/wine/dplayx/dplayx_global.h b/dll/directx/wine/dplayx/dplayx_global.h index e388e077f6d..848771bced6 100644 --- a/dll/directx/wine/dplayx/dplayx_global.h +++ b/dll/directx/wine/dplayx/dplayx_global.h @@ -19,33 +19,12 @@ #ifndef __WINE_DPLAYX_GLOBAL #define __WINE_DPLAYX_GLOBAL -#include - #include -#define WIN32_NO_STATUS -#define _INC_WINDOWS - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include -#include -#include -#include - -#include -#include - -#include "dplaysp.h" -#include "lobbysp.h" -#include "dplayx_queue.h" -#include "dplay_global.h" -#include "dplayx_messages.h" -#include "name_server.h" - -WINE_DEFAULT_DEBUG_CHANNEL(dplay); +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "dplay.h" BOOL DPLAYX_ConstructData(void) DECLSPEC_HIDDEN; BOOL DPLAYX_DestructData(void) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/dplayx/dplayx_main.c b/dll/directx/wine/dplayx/dplayx_main.c index 423ee70eadb..b1076ff2f64 100644 --- a/dll/directx/wine/dplayx/dplayx_main.c +++ b/dll/directx/wine/dplayx/dplayx_main.c @@ -56,10 +56,17 @@ * client. Also get rid of offset dependency by making data offset independent * somehow. */ +#include +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "rpcproxy.h" +#include "wine/debug.h" #include "dplayx_global.h" -#include +WINE_DEFAULT_DEBUG_CHANNEL(dplay); static HINSTANCE instance; diff --git a/dll/directx/wine/dplayx/dplayx_messages.c b/dll/directx/wine/dplayx/dplayx_messages.c index 8318d4adfa2..6f6636c4b95 100644 --- a/dll/directx/wine/dplayx/dplayx_messages.c +++ b/dll/directx/wine/dplayx/dplayx_messages.c @@ -20,7 +20,21 @@ * o Messaging interface required for both DirectPlay and DirectPlayLobby. */ +#include +#include +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winerror.h" + +#include "dplayx_messages.h" +#include "dplay_global.h" #include "dplayx_global.h" +#include "name_server.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); typedef struct tagMSGTHREADINFO { diff --git a/dll/directx/wine/dplayx/dplayx_messages.h b/dll/directx/wine/dplayx/dplayx_messages.h index 755f8bec6f3..c6f7f8af57f 100644 --- a/dll/directx/wine/dplayx/dplayx_messages.h +++ b/dll/directx/wine/dplayx/dplayx_messages.h @@ -19,6 +19,15 @@ #ifndef __WINE_DPLAYX_MESSAGES__ #define __WINE_DPLAYX_MESSAGES__ +#include + +#include "windef.h" +#include "winbase.h" +#include "dplay.h" +#include "rpc.h" /* For GUID */ + +#include "dplay_global.h" + DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead ) DECLSPEC_HIDDEN; @@ -39,7 +48,7 @@ void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) DECLSPEC_HIDDEN; #define DPMSG_DEFAULT_WAIT_TIME DPMSG_WAIT_30_SECS /* Message types etc. */ -#include +#include "pshpack1.h" /* Non provided messages for DPLAY - guess work which may be wrong :( */ #define DPMSGCMD_ENUMSESSIONSREPLY 1 @@ -209,6 +218,6 @@ typedef struct tagDPMSG_FORWARDADDPLAYERNACK } DPMSG_FORWARDADDPLAYERNACK, *LPDPMSG_FORWARDADDPLAYERNACK; typedef const DPMSG_FORWARDADDPLAYERNACK* LPCDPMSG_FORWARDADDPLAYERNACK; -#include +#include "poppack.h" -#endif /* __WINE_DPLAYX_MESSAGES__ */ +#endif diff --git a/dll/directx/wine/dplayx/dplayx_queue.h b/dll/directx/wine/dplayx/dplayx_queue.h index 3cd4f0be5f5..e704d9a7077 100644 --- a/dll/directx/wine/dplayx/dplayx_queue.h +++ b/dll/directx/wine/dplayx/dplayx_queue.h @@ -26,6 +26,11 @@ #ifndef __WINE_DPLAYX_QUEUE_H #define __WINE_DPLAYX_QUEUE_H +#include + +#include "windef.h" +#include "winbase.h" + #define DPQ_INSERT(a,b,c) DPQ_INSERT_IN_TAIL(a,b,c) /* diff --git a/dll/directx/wine/dplayx/dplobby.c b/dll/directx/wine/dplayx/dplobby.c index 58536d87660..944fea9ec64 100644 --- a/dll/directx/wine/dplayx/dplobby.c +++ b/dll/directx/wine/dplayx/dplobby.c @@ -16,8 +16,25 @@ * 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 +#include + +#define COBJMACROS +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" +#include "winnls.h" +#include "wine/debug.h" #include "dplayx_global.h" +#include "dplayx_messages.h" +#include "dplayx_queue.h" +#include "dplobby.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* Forward declarations for this module helper methods */ HRESULT DPL_CreateCompoundAddress ( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount, diff --git a/dll/directx/wine/dplayx/lobbysp.c b/dll/directx/wine/dplayx/lobbysp.c index 7b1da09cf17..3528f94e345 100644 --- a/dll/directx/wine/dplayx/lobbysp.c +++ b/dll/directx/wine/dplayx/lobbysp.c @@ -18,8 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dplayx_global.h" +#include "winerror.h" +#include "wine/debug.h" +#include "lobbysp.h" +#include "dplay_global.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); typedef struct IDPLobbySPImpl { diff --git a/dll/directx/wine/dplayx/lobbysp.h b/dll/directx/wine/dplayx/lobbysp.h index 2a214a91df4..8d871160b65 100644 --- a/dll/directx/wine/dplayx/lobbysp.h +++ b/dll/directx/wine/dplayx/lobbysp.h @@ -19,6 +19,13 @@ #ifndef __WINE_LOBBY_SP_H #define __WINE_LOBBY_SP_H +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "dplobby.h" + /* GUID for IDPLobbySP {5A4E5A20-2CED-11d0-A889-00A0C905433C} */ DEFINE_GUID(IID_IDPLobbySP, 0x5a4e5a20, 0x2ced, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c); typedef struct IDPLobbySP *LPDPLOBBYSP; @@ -509,4 +516,4 @@ DECLARE_INTERFACE_(IDPLobbySP,IUnknown) */ extern DWORD gdwDPlaySPRefCount DECLSPEC_HIDDEN; -#endif /* __WINE_LOBBY_SP_H */ +#endif diff --git a/dll/directx/wine/dplayx/name_server.c b/dll/directx/wine/dplayx/name_server.c index 2566c3699fd..7ca1500bfb3 100644 --- a/dll/directx/wine/dplayx/name_server.c +++ b/dll/directx/wine/dplayx/name_server.c @@ -19,12 +19,28 @@ /* NOTE: Methods with the NS_ prefix are name server methods */ -#include "dplayx_global.h" +#include +#include -#include +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "wine/unicode.h" +#include "wine/debug.h" +#include "mmsystem.h" + +#include "dplayx_global.h" +#include "name_server.h" +#include "wine/dplaysp.h" +#include "dplayx_messages.h" +#include "dplayx_queue.h" /* FIXME: Need to create a crit section, store and use it */ +WINE_DEFAULT_DEBUG_CHANNEL(dplay); + /* NS specific structures */ struct NSCacheData { diff --git a/dll/directx/wine/dplayx/name_server.h b/dll/directx/wine/dplayx/name_server.h index 6213cceef91..2ad012c2faa 100644 --- a/dll/directx/wine/dplayx/name_server.h +++ b/dll/directx/wine/dplayx/name_server.h @@ -19,6 +19,15 @@ #ifndef __WINE_DPLAYX_NAMESERVER #define __WINE_DPLAYX_NAMESERVER +#include + +#include "windef.h" +#include "winbase.h" +#include "dplay.h" +#include "wine/dplaysp.h" +#include "dplayx_messages.h" +#include "dplay_global.h" + void NS_SetLocalComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo ) DECLSPEC_HIDDEN; void NS_AddRemoteComputerAsNameServer( LPCVOID lpNSAddrHdr, DWORD dwHdrSize, diff --git a/dll/directx/wine/dplayx/precomp.h b/dll/directx/wine/dplayx/precomp.h new file mode 100644 index 00000000000..ac5ab0cc8ab --- /dev/null +++ b/dll/directx/wine/dplayx/precomp.h @@ -0,0 +1,23 @@ + +#ifndef __WINE_DPLAYX_PRECOMP_H +#define __WINE_DPLAYX_PRECOMP_H + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "dplay_global.h" +#include "dplayx_global.h" +#include "dplayx_messages.h" +#include "name_server.h" + +#include +#include +#include + +#endif /* !__WINE_DPLAYX_PRECOMP_H */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 625b7eb0e99..f03769bea87 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -34,7 +34,7 @@ reactos/dll/directx/wine/dinput # Synced to WineStaging-3.3 reactos/dll/directx/wine/dinput8 # Synced to WineStaging-3.3 reactos/dll/directx/wine/dmusic # Synced to WineStaging-3.3 reactos/dll/directx/wine/dplay # Synced to WineStaging-3.3 -reactos/dll/directx/wine/dplayx # Synced to WineStaging-2.16 +reactos/dll/directx/wine/dplayx # Synced to WineStaging-3.3 reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29 reactos/dll/directx/wine/dxdiagn # Synced to Wine-3.0 reactos/dll/directx/wine/msdmo # Synced to WineStaging-2.9