From 6b39263dab79ab20118bc2bb17677a0c5b14e84c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 4 Nov 2018 21:37:56 -0800 Subject: GLK: Workaround to show caret for second line entry onwards Not sure how original GLK code properly re-renders the caret, since the line isn't marked as dirty once input starts. This workaround marks the line as dirty when a line request is done, which allows the line to be redrawn with the caret --- engines/gargoyle/window_text_buffer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/gargoyle/window_text_buffer.cpp b/engines/gargoyle/window_text_buffer.cpp index 61cf92a22c..9b32393edc 100644 --- a/engines/gargoyle/window_text_buffer.cpp +++ b/engines/gargoyle/window_text_buffer.cpp @@ -637,6 +637,9 @@ void TextBufferWindow::requestLineEvent(char *buf, glui32 maxlen, glui32 initlen putText(buf, initlen, _inCurs, 0); } + // WORKAROUND: Mark bottom line as dirty so caret will be drawn + _lines[0]._dirty = true; + _echoLineInput = _echoLineInputBase; if (_lineTerminatorsBase && _termCt) { @@ -690,6 +693,9 @@ void TextBufferWindow::requestLineEventUni(glui32 *buf, glui32 maxlen, glui32 in putTextUni(buf, initlen, _inCurs, 0); } + // WORKAROUND: Mark bottom line as dirty so caret will be drawn + _lines[0]._dirty = true; + _echoLineInput = _echoLineInputBase; if (_lineTerminatorsBase && _termCt) { -- cgit v1.2.3