From 8f1c38b695a59245c94cd49fa3af7009c6ceca4c Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 29 Mar 2011 20:18:16 +0000 Subject: [PATCH] ncurses: if terminal doesn't support curs_set(2), try curs_set(1). --- caca/driver/ncurses.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caca/driver/ncurses.c b/caca/driver/ncurses.c index 298ecca..32bb5a3 100644 --- a/caca/driver/ncurses.c +++ b/caca/driver/ncurses.c @@ -568,7 +568,10 @@ static int ncurses_get_event(caca_display_t *dp, caca_privevent_t *ev) static void ncurses_set_cursor(caca_display_t *dp, int flags) { - curs_set(flags ? 2 : 0); + if (!flags) + curs_set(0); + else if (curs_set(2) == ERR) + curs_set(1); } /*