From aec32ed603039eb980ced2cfbd15ebc4023d71c6 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Mon, 30 Dec 2024 20:12:07 +0100 Subject: [PATCH] Fixed gui console cursor blinking. --- bochs/gui/gui.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bochs/gui/gui.cc b/bochs/gui/gui.cc index bfa75d247..e5057da1d 100644 --- a/bochs/gui/gui.cc +++ b/bochs/gui/gui.cc @@ -1591,6 +1591,7 @@ char* bx_gui_c::bx_gets(char *s, int size) int cs_counter = 1, cs_visible = 0; set_console_edit_mode(1); + console.tminfo.blink_flags |= BX_TEXT_BLINK_MODE; keystr[1] = 0; do { handle_events(); @@ -1622,13 +1623,19 @@ char* bx_gui_c::bx_gets(char *s, int size) cs_visible ^= 1; if (cs_visible) { console.tminfo.cs_start &= ~0x20; + console.tminfo.blink_flags |= BX_TEXT_BLINK_STATE; } else { console.tminfo.cs_start |= 0x20; + console.tminfo.blink_flags &= ~BX_TEXT_BLINK_STATE; } + console.tminfo.blink_flags |= BX_TEXT_BLINK_TOGGLE; console_refresh(0); + } else { + console.tminfo.blink_flags &= ~BX_TEXT_BLINK_TOGGLE; } } while (!done); console.tminfo.cs_start |= 0x20; + console.tminfo.blink_flags &= ~BX_TEXT_BLINK_MODE; set_console_edit_mode(0); return s; }