[RESEND] [PATCH] DirectPlay should keep track of the current number of players

Kai Blin kai.blin at gmail.com
Thu Mar 8 01:22:59 CST 2007

On Wednesday 07 March 2007 10:52, Alessandro Pignotti wrote:
> +  /* I think we have to add a player to the total number of players only if it's not a player created for system 
> +     purpose like the name server.  This way it seems we get a correct player number */
> +  if( ~dwFlags &  DPLAYI_PLAYER_SYSPLAYER )
> +    This->dp2->lpSessionDesc->dwCurrentPlayers++;
> +
>    /* FIXME: Should we be storing these dwFlags or the creation ones? */
> -  lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwFlags,
> +  /* I think we should 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 );

Every time someone uses "I think" in the code, usually this calls for a test case.
This one should be rather straightforward to test.


Kai Blin, <kai Dot blin At gmail Dot com>
WorldForge developer    http://www.worldforge.org/
Wine developer          http://wiki.winehq.org/KaiBlin/
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070308/a6910bb6/attachment.pgp

More information about the wine-devel mailing list