diff options
author | June McEnroe <june@causal.agency> | 2021-10-15 15:55:52 +0000 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-10-15 15:55:52 +0000 |
commit | e206bf6d689cab448f531b74db7cbc7a6cfce9d2 (patch) | |
tree | ad4e223eea5a25dd6ad802464a1e22ebe6502714 /freecell.c | |
parent | Build chroot only on OpenBSD (diff) | |
download | play-e206bf6d689cab448f531b74db7cbc7a6cfce9d2.tar.gz play-e206bf6d689cab448f531b74db7cbc7a6cfce9d2.zip |
Retry getch() after ERR
In the version of ncurses in OpenBSD, the SIGWINCH handler installed by enabling keypad causes the read() inside getch() to fail with EINTR, which getch() doesn't handle, itself returning ERR.
Diffstat (limited to '')
-rw-r--r-- | freecell.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/freecell.c b/freecell.c index 3855d18..b3ca0e9 100644 --- a/freecell.c +++ b/freecell.c @@ -325,6 +325,7 @@ static bool quit; static void input(void) { MEVENT m; int ch = getch(); + if (ch == ERR) ch = getch(); uint stack = Stacks; if (ch == KEY_MOUSE && getmouse(&m) == OK) { |