mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
flag unusued param to fix compile error; move code used only in
multi-device games inside ifdefs.
This commit is contained in:
parent
0f3b206371
commit
a26f6ad658
2 changed files with 17 additions and 15 deletions
|
@ -1003,7 +1003,7 @@ btIpPreProcess( CommsCtxt* comms, XWStreamCtxt* stream )
|
|||
|
||||
static XP_Bool
|
||||
preProcess( CommsCtxt* comms, XWStreamCtxt* stream,
|
||||
XP_Bool* usingRelay, XWHostID* XP_UNUSED_RELAY(senderID) )
|
||||
XP_Bool* XP_UNUSED_RELAY(usingRelay), XWHostID* XP_UNUSED_RELAY(senderID) )
|
||||
{
|
||||
XP_Bool consumed = XP_FALSE;
|
||||
switch ( comms->addr.conType ) {
|
||||
|
|
|
@ -185,29 +185,31 @@ logNewState( XW_State old, XW_State newst )
|
|||
static void
|
||||
initServer( ServerCtxt* server )
|
||||
{
|
||||
XP_U16 i;
|
||||
CurGameInfo* gi = server->vol.gi;
|
||||
LocalPlayer* lp;
|
||||
ServerPlayer* player;
|
||||
|
||||
setTurn( server, -1 ); /* game isn't under way yet */
|
||||
|
||||
if ( server->vol.gi->serverRole == SERVER_ISCLIENT ) {
|
||||
if ( 0 ) {
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
} else if ( server->vol.gi->serverRole == SERVER_ISCLIENT ) {
|
||||
SETSTATE( server, XWSTATE_NONE );
|
||||
#endif
|
||||
} else {
|
||||
SETSTATE( server, XWSTATE_BEGIN );
|
||||
}
|
||||
|
||||
lp = gi->players;
|
||||
player = server->players;
|
||||
for ( i = 0; i < gi->nPlayers; ++i, ++lp, ++player ) {
|
||||
if ( !lp->isLocal/* && !lp->name */ ) {
|
||||
++server->nv.pendingRegistrations;
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
{
|
||||
XP_U16 ii;
|
||||
CurGameInfo* gi = server->vol.gi;
|
||||
LocalPlayer* lp = gi->players;
|
||||
ServerPlayer* player = server->players;
|
||||
for ( ii = 0; ii < gi->nPlayers; ++ii, ++lp, ++player ) {
|
||||
if ( !lp->isLocal/* && !lp->name */ ) {
|
||||
++server->nv.pendingRegistrations;
|
||||
}
|
||||
player->deviceIndex = lp->isLocal? SERVER_DEVICE : UNKNOWN_DEVICE;
|
||||
}
|
||||
|
||||
player->deviceIndex = lp->isLocal? SERVER_DEVICE : UNKNOWN_DEVICE;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
server->nv.nDevices = 1; /* local device (0) is always there */
|
||||
} /* initServer */
|
||||
|
|
Loading…
Reference in a new issue