From 9d69d53335a18e6d9a6236689151c5a591ff09ae Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Thu, 15 Mar 2007 17:10:25 +0100 Subject: [PATCH] dplayx: DirectPlay should keep track of the user count. --- dlls/dplayx/dplay.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 46a4dc788d7..9889283137a 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -1227,6 +1227,9 @@ lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* This, LPDPID lpid, TRACE( "Created player id 0x%08x\n", *lpid ); + if( ~dwFlags & DPLAYI_PLAYER_SYSPLAYER ) + This->dp2->lpSessionDesc->dwCurrentPlayers++; + return lpPData; } @@ -1478,8 +1481,9 @@ static HRESULT WINAPI DP_IF_CreatePlayer */ } - /* FIXME: Should we be storing these dwFlags or the creation ones? */ - lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwFlags, + /* We pass creation flags, so we can distinguish sysplayers and not count them in the current + player total */ + lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwCreateFlags, hEvent, bAnsi ); if( lpPData == NULL )