Alessandro Pignotti : dplayx:
DirectPlay should keep track of the user count.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 16 07:20:26 CDT 2007
Module: wine
Branch: master
Commit: 9d69d53335a18e6d9a6236689151c5a591ff09ae
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d69d53335a18e6d9a6236689151c5a591ff09ae
Author: Alessandro Pignotti <alex.pigna at inventati.org>
Date: Thu Mar 15 17:10:25 2007 +0100
dplayx: DirectPlay should keep track of the user count.
---
dlls/dplayx/dplay.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 46a4dc7..9889283 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 )
More information about the wine-cvs
mailing list