mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
toss WSAPoll() into the mix
This commit is contained in:
parent
da87386957
commit
63df228336
@ -409,8 +409,12 @@ block_on_input(int fd, const struct timespec* ts){
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
int timeoutms = ts ? ts->tv_sec * 1000 + ts->tv_nsec / 1000000 : -1;
|
int timeoutms = ts ? ts->tv_sec * 1000 + ts->tv_nsec / 1000000 : -1;
|
||||||
while((events = poll(&pfd, 1, timeoutms)) < 0){ // FIXME smask?
|
while((events = poll(&pfd, 1, timeoutms)) < 0){ // FIXME smask?
|
||||||
|
#else
|
||||||
|
#ifdef __MINGW64__
|
||||||
|
while((events = WSAPoll(&pfd, 1, 0)) < 0){
|
||||||
#else
|
#else
|
||||||
while((events = ppoll(&pfd, 1, ts, &smask)) < 0){
|
while((events = ppoll(&pfd, 1, ts, &smask)) < 0){
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if(events == 0){
|
if(events == 0){
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user