mirror of https://github.com/mgba-emu/mgba.git
Util: Fix SocketPoll on pthreads
This commit is contained in:
parent
9273a4ca72
commit
0ab8cfe6ad
|
@ -253,7 +253,7 @@ static inline int SocketPoll(size_t nSockets, Socket* reads, Socket* writes, Soc
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
tv.tv_sec = timeoutMillis / 1000;
|
tv.tv_sec = timeoutMillis / 1000;
|
||||||
tv.tv_usec = (timeoutMillis % 1000) * 1000;
|
tv.tv_usec = (timeoutMillis % 1000) * 1000;
|
||||||
int result = select(maxFd, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv);
|
int result = select(maxFd + 1, &rset, &wset, &eset, timeoutMillis < 0 ? 0 : &tv);
|
||||||
int r = 0;
|
int r = 0;
|
||||||
int w = 0;
|
int w = 0;
|
||||||
int e = 0;
|
int e = 0;
|
||||||
|
|
Loading…
Reference in New Issue