Browse Source

Fix and reenable SNetReceiveTurns on 3DS

pull/2130/head
staphen 5 years ago committed by Anders Jenbo
parent
commit
1ca50e65eb
  1. 7
      Source/nthread.cpp
  2. 2
      Source/storm/storm.h

7
Source/nthread.cpp

@ -92,10 +92,7 @@ bool nthread_recv_turns(bool *pfSendAsync)
last_tick += gnTickDelay;
return true;
}
#ifdef __3DS__
return false;
#else
if (!SNetReceiveTurns(0, MAX_PLRS, (char **)glpMsgTbl, gdwMsgLenTbl, &player_state[0])) {
if (!SNetReceiveTurns(0, MAX_PLRS, (char **)glpMsgTbl, (unsigned int *)gdwMsgLenTbl, &player_state[0])) {
if (SErrGetLastError() != STORM_ERROR_NO_MESSAGES_WAITING)
nthread_terminate_game("SNetReceiveTurns");
sgbTicsOutOfSync = false;
@ -112,8 +109,6 @@ bool nthread_recv_turns(bool *pfSendAsync)
*pfSendAsync = true;
last_tick += gnTickDelay;
return true;
#endif
}
static unsigned int nthread_handler(void *data)

2
Source/storm/storm.h

@ -199,7 +199,7 @@ bool SNetJoinGame(char *gameName, char *gamePassword, int *playerid);
bool SNetLeaveGame(int type);
bool SNetReceiveMessage(int *senderplayerid, char **data, int *databytes);
bool SNetReceiveTurns(int a1, int arraysize, char **arraydata, DWORD *arraydatabytes, DWORD *arrayplayerstatus);
bool SNetReceiveTurns(int a1, int arraysize, char **arraydata, unsigned int *arraydatabytes, DWORD *arrayplayerstatus);
typedef void (*SEVTHANDLER)(struct _SNETEVENT *);

Loading…
Cancel
Save