mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[cli1 poc] don't set unused fd on windows
This commit is contained in:
parent
3cfb3adf1a
commit
aa27d41442
@ -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){
|
||||||
|
Loading…
Reference in New Issue
Block a user