From 76fadf774e4f4afddda17857afa5925e8601acac Mon Sep 17 00:00:00 2001 From: Ismael Barros Date: Sat, 29 Aug 2009 04:19:28 +0200 Subject: [PATCH] dplayx: Adjust GetCaps behaviour to documentation --- dlls/dplayx/dplay.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index f31871f930e..6246b4878a5 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -2562,6 +2562,7 @@ static HRESULT DP_IF_GetPlayerCaps ( IDirectPlay2Impl* This, DPID idPlayer, LPDPCAPS lpDPCaps, DWORD dwFlags ) { + HRESULT hr; DPSP_GETCAPSDATA data; TRACE("(%p)->(0x%08x,%p,0x%08x)\n", This, idPlayer, lpDPCaps, dwFlags); @@ -2582,7 +2583,12 @@ static HRESULT DP_IF_GetPlayerCaps data.lpCaps = lpDPCaps; data.lpISP = This->dp2->spData.lpISP; - return (*This->dp2->spData.lpCB->GetCaps)( &data ); + hr = (*This->dp2->spData.lpCB->GetCaps)( &data ); + + /* Substract size of DirectPlay header */ + data.lpCaps->dwMaxBufferSize -= sizeof(DPSP_MSG_ENVELOPE); + + return hr; } static HRESULT DP_IF_GetCaps -- 2.11.4.GIT