[cli1 poc] don't set unused fd on windows

This commit is contained in:
nick black 2021-12-10 03:05:29 -05:00
parent 3cfb3adf1a
commit aa27d41442
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -16,7 +16,6 @@ int main(void){
struct ncplane* stdn = notcurses_stdplane(nc); struct ncplane* stdn = notcurses_stdplane(nc);
ncplane_set_scrolling(stdn, true); ncplane_set_scrolling(stdn, true);
ncinput ni; ncinput ni;
int fd = notcurses_inputready_fd(nc);
do{ do{
if(ncplane_putstr(stdn, "press any key\n") < 0){ if(ncplane_putstr(stdn, "press any key\n") < 0){
goto err; goto err;
@ -27,7 +26,7 @@ int main(void){
// just some pointless testing of notcurses_inputready_fd() here // just some pointless testing of notcurses_inputready_fd() here
#ifndef __MINGW64__ #ifndef __MINGW64__
struct pollfd pfd = { struct pollfd pfd = {
.fd = fd, .fd = notcurses_inputready_fd(nc),
.events = POLLIN, .events = POLLIN,
}; };
while(poll(&pfd, 1, -1) <= 0){ while(poll(&pfd, 1, -1) <= 0){