Skip to content

Commit 8096edb

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4133fd2 + 6ef4e7d commit 8096edb

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed

premake4.lua

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
solution "enet"
2+
configurations { "Debug", "Release" }
3+
platforms { "x32", "x64" }
4+
5+
project "enet_static"
6+
kind "StaticLib"
7+
language "C"
8+
9+
files { "*.c" }
10+
11+
includedirs { "include/" }
12+
13+
configuration "Debug"
14+
targetsuffix "d"
15+
16+
defines({ "DEBUG" })
17+
18+
flags { "Symbols" }
19+
20+
configuration "Release"
21+
defines({ "NDEBUG" })
22+
23+
flags { "Optimize" }
24+
25+
configuration { "Debug", "x64" }
26+
targetsuffix "64d"
27+
28+
configuration { "Release", "x64" }
29+
targetsuffix "64"
30+
31+
project "enet"
32+
kind "SharedLib"
33+
language "C"
34+
35+
files { "*.c" }
36+
37+
includedirs { "include/" }
38+
39+
defines({"ENET_DLL=1" })
40+
41+
configuration "Debug"
42+
targetsuffix "d"
43+
44+
defines({ "DEBUG" })
45+
46+
flags { "Symbols" }
47+
48+
configuration "Release"
49+
defines({ "NDEBUG" })
50+
51+
flags { "Optimize" }
52+
53+
configuration { "Debug", "x64" }
54+
targetsuffix "64d"
55+
56+
configuration { "Release", "x64" }
57+
targetsuffix "64"
58+
59+

protocol.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,9 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
11911191
static int
11921192
enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
11931193
{
1194-
for (;;)
1194+
int packets;
1195+
1196+
for (packets = 0; packets < 256; ++ packets)
11951197
{
11961198
int receivedLength;
11971199
ENetBuffer buffer;

win32.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
*/
55
#ifdef _WIN32
66

7-
#include <time.h>
87
#define ENET_BUILDING_LIB 1
98
#include "enet/enet.h"
9+
#include <windows.h>
10+
#include <mmsystem.h>
1011

1112
static enet_uint32 timeBase = 0;
1213

0 commit comments

Comments
 (0)