From 79c2fe897d88310734d46cfa6692fda3727e76d5 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 13 Aug 2016 17:27:11 -0400 Subject: console bridge: added --bell support. --- src/console/ptyc_console_alloc.c | 1 + src/console/ptyc_console_writer.c | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'src/console') diff --git a/src/console/ptyc_console_alloc.c b/src/console/ptyc_console_alloc.c index ea44971..a8f1610 100644 --- a/src/console/ptyc_console_alloc.c +++ b/src/console/ptyc_console_alloc.c @@ -162,6 +162,7 @@ int ptyc_alloc_console(struct ptyc_driver_ctx * dctx) tctx->screen_size.x = 512; tctx->screen_size.y = 4096; + tctx->drvflags = ictx->cctx.drvflags; if (!(ntcon->alloc_console())) return NT_STATUS_UNSUCCESSFUL; diff --git a/src/console/ptyc_console_writer.c b/src/console/ptyc_console_writer.c index 63384c0..38461a0 100644 --- a/src/console/ptyc_console_writer.c +++ b/src/console/ptyc_console_writer.c @@ -109,6 +109,11 @@ static void * __fastcall ptyc_screen_handler(struct ptyc_term_ctx * tctx) /* switch mode */ return tctx->ctrl_handler; } else { + /* filter out bell key? */ + if (*tctx->wch_pty == 0x7) + if (!(tctx->drvflags & PTYC_DRIVER_BELL)) + return ptyc_screen_handler; + /* copy character to the screen buffer */ *tctx->wch_con = *tctx->wch_pty; -- cgit v1.2.3