dplayx: Set group data in DP_CreateGroup().

This commit is contained in:
Anton Baskanov 2024-11-17 16:13:11 +07:00 committed by Alexandre Julliard
parent 1b9b7a5e65
commit be022f350d
Notes: Alexandre Julliard 2024-11-18 23:18:20 +01:00
Approved-by: Alistair Leslie-Hughes (@alesliehughes)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6829

View file

@ -1282,7 +1282,7 @@ static HRESULT WINAPI IDirectPlay4Impl_Close( IDirectPlay4 *iface )
}
static lpGroupData DP_CreateGroup( IDirectPlayImpl *This, const DPID *lpid, const DPNAME *lpName,
DWORD dwFlags, DPID idParent, BOOL bAnsi )
void *data, DWORD dataSize, DWORD dwFlags, DPID idParent, BOOL bAnsi )
{
struct GroupList *groupList = NULL;
struct GroupData *parent = NULL;
@ -1363,6 +1363,8 @@ static lpGroupData DP_CreateGroup( IDirectPlayImpl *This, const DPID *lpid, cons
/* Something is now referencing this data */
lpGData->uRef++;
DP_SetGroupData( lpGData, DPSET_REMOTE, data, dataSize );
TRACE( "Created group id 0x%08lx\n", *lpid );
return lpGData;
@ -1453,7 +1455,7 @@ static HRESULT DP_IF_CreateGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID *l
}
}
lpGData = DP_CreateGroup( This, lpidGroup, lpGroupName, dwFlags,
lpGData = DP_CreateGroup( This, lpidGroup, lpGroupName, lpData, dwDataSize, dwFlags,
DPID_NOPARENT_GROUP, bAnsi );
if( lpGData == NULL )
@ -1461,9 +1463,6 @@ static HRESULT DP_IF_CreateGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID *l
return DPERR_CANTADDPLAYER; /* yes player not group */
}
/* Set all the important stuff for the group */
DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize );
/* FIXME: We should only create the system group if GetCaps returns
* DPCAPS_GROUPOPTIMIZED.
*/
@ -4484,15 +4483,14 @@ static HRESULT DP_IF_CreateGroupInGroup( IDirectPlayImpl *This, void *lpMsgHdr,
return DPERR_UNINITIALIZED;
}
lpGData = DP_CreateGroup(This, lpidGroup, lpGroupName, dwFlags, idParentGroup, bAnsi );
lpGData = DP_CreateGroup(This, lpidGroup, lpGroupName, lpData, dwDataSize, dwFlags, idParentGroup,
bAnsi );
if( lpGData == NULL )
{
return DPERR_CANTADDPLAYER; /* yes player not group */
}
DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize );
/* Let the SP know that we've created this group */
if( This->dp2->spData.lpCB->CreateGroup )
{