mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-16 04:18:51 +08:00
setting console mode to processed output not neccesary if we use SetConsoleCursorPosition
This commit is contained in:
@@ -14,12 +14,6 @@ namespace indicators {
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
void enable_cursor_movement() {
|
||||
auto hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleMode(hStdout,
|
||||
ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||||
}
|
||||
|
||||
void show_console_cursor(bool const show) {
|
||||
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
@@ -32,8 +26,6 @@ void show_console_cursor(bool const show) {
|
||||
|
||||
#else
|
||||
|
||||
void enable_cursor_movement() {}
|
||||
|
||||
void show_console_cursor(bool const show) {
|
||||
std::fputs(show ? "\e[?25h" : "\e[?25l", stdout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user