summaryrefslogtreecommitdiffstats
path: root/osdep/getch2.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/getch2.c')
-rw-r--r--osdep/getch2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/osdep/getch2.c b/osdep/getch2.c
index 4a591da2db..4aa09323eb 100644
--- a/osdep/getch2.c
+++ b/osdep/getch2.c
@@ -58,6 +58,7 @@
#include "mp_fifo.h"
#include "keycodes.h"
+#include "getch2.h"
#ifdef HAVE_TERMIOS
static struct termios tio_orig;
@@ -116,7 +117,7 @@ int load_termcap(char *termtype){
screen_height=tgetnum("li");
if(screen_width<1 || screen_width>255) screen_width=80;
if(screen_height<1 || screen_height>255) screen_height=24;
- erase_to_end_of_line= tgetstr("cd",&term_p);
+ erase_to_end_of_line= tgetstr("ce",&term_p);
termcap_add("kP",KEY_PGUP);
termcap_add("kN",KEY_PGDWN);
@@ -155,7 +156,7 @@ void get_screen_size(void){
#endif
}
-void getch2(void)
+void getch2(struct mp_fifo *fifo)
{
int retval = read(0, &getch2_buf[getch2_len], BUF_LEN-getch2_len);
if (retval < 1)
@@ -264,7 +265,7 @@ void getch2(void)
getch2_len -= len;
for (i = 0; i < getch2_len; i++)
getch2_buf[i] = getch2_buf[len+i];
- mplayer_put_key(code);
+ mplayer_put_key(fifo, code);
}
}
@@ -303,4 +304,3 @@ char* get_term_charset(void)
return charset;
}
#endif
-