From bbefa87db18f5b76dc67efa00b7cc798361480f3 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Thu, 13 Nov 2008 18:58:41 +0000 Subject: Hacked the source to get it compile on Windows Mobile using CeGCC toolchain. Fixed nasty memory corruption bug in UI scripts loading code. Fixed software refresh compilation issues on Windows. Inactive MVD channels are now completely destroyed and recreated once they are active again, and they are no longer allowed to stay in waiting state forever. Fixed delay buffer overflow resulting in fatal connection error. Preserve MVD stream flags in demos recorded on GTV server, and handle `inuse' flag correctly on players when writing gamestate. Updated documentation and Debian package descriptions. --- source/net_common.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'source/net_common.c') diff --git a/source/net_common.c b/source/net_common.c index 249c02b..0266172 100644 --- a/source/net_common.c +++ b/source/net_common.c @@ -32,13 +32,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "sys_public.h" #include "sv_public.h" -#if defined( _WIN32 ) +#if( defined _WIN32 ) #define WIN32_LEAN_AND_MEAN #include #include #define socklen_t int +#ifdef _WIN32_WCE +#define NET_GET_ERROR() ( net_error = GetLastError() ) +#else #define NET_GET_ERROR() ( net_error = WSAGetLastError() ) -#elif defined( __unix__ ) +#endif +#elif( defined __unix__ ) #include #include #include @@ -523,8 +527,8 @@ neterr_t NET_GetPacket( netsrc_t sock ) { memset( &from, 0, sizeof( from ) ); fromlen = sizeof( from ); - ret = recvfrom( udp_sockets[sock], msg_read_buffer, MAX_PACKETLEN, 0, - ( struct sockaddr * )&from, &fromlen ); + ret = recvfrom( udp_sockets[sock], ( void * )msg_read_buffer, + MAX_PACKETLEN, 0, ( struct sockaddr * )&from, &fromlen ); if( !ret ) { return NET_AGAIN; @@ -1128,7 +1132,7 @@ neterr_t NET_RunStream( netstream_t *s ) { fd_set rfd, wfd; int ret; size_t len; - byte *data; + void *data; neterr_t result = NET_AGAIN; if( s->state != NS_CONNECTED ) { @@ -1371,7 +1375,9 @@ static void NET_Restart_f( void ) { NET_Listen( qtrue ); } +#if USE_SYSCON SV_SetConsoleTitle(); +#endif } /* -- cgit v1.2.3