projects
/
oftp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[oftp]
/
src
/
dos
/
input.c
diff --git
a/src/dos/input.c
b/src/dos/input.c
index
99a40de
..
4b36e4a
100644
(file)
--- a/
src/dos/input.c
+++ b/
src/dos/input.c
@@
-10,9
+10,17
@@
void cleanup_input(void)
{
}
{
}
-int wait_input(union event *ev)
+int poll_input(union event *ev)
{
{
- ev->type = EV_KEY;
- ev->key.key = getch();
- return 1;
+ if(have_input()) {
+ ev->type = EV_KEY;
+ ev->key.key = getch();
+ return 1;
+ }
+ return 0;
+}
+
+int have_input(void)
+{
+ return kbhit();
}
}