From 1ca50e65ebd7bde9432462658ce613c0393c4b0b Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 8 Jun 2021 09:36:18 -0400 Subject: [PATCH] Fix and reenable SNetReceiveTurns on 3DS --- Source/nthread.cpp | 7 +------ Source/storm/storm.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 9c97ec6e7..fdaf8a62d 100644 --- a/Source/nthread.cpp +++ b/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) diff --git a/Source/storm/storm.h b/Source/storm/storm.h index 0c70780ca..ff1c89997 100644 --- a/Source/storm/storm.h +++ b/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 *);