Skip to content

Commit

Permalink
Fixed gui console cursor blinking.
Browse files Browse the repository at this point in the history
  • Loading branch information
vruppert committed Dec 30, 2024
1 parent 64aeb6d commit aec32ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bochs/gui/gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit aec32ed

Please sign in to comment.