mirror of
https://github.com/okalachev/flix.git
synced 2026-09-06 00:10:58 +00:00
Minor change
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ public:
|
|||||||
// to implement for Windows, see https://stackoverflow.com/a/71992965/6850197
|
// to implement for Windows, see https://stackoverflow.com/a/71992965/6850197
|
||||||
if (!isatty(STDIN_FILENO)) return 0;
|
if (!isatty(STDIN_FILENO)) return 0;
|
||||||
struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN };
|
struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN };
|
||||||
return poll(&pfd, 1, 0) > 0;
|
return poll(&pfd, 1, 0) > 0 && (pfd.revents & POLLIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
int read() {
|
int read() {
|
||||||
|
|||||||
Reference in New Issue
Block a user