From 982ea40daf78d716d7e0bd738d3ca484a8851519 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sun, 31 Mar 2019 21:00:43 -0300 Subject: [PATCH] Revert "Minor bugs fixed in clear_console functions" This reverts commit 877089972b094824890dc241ad8b11b0ed433408. --- internal/c/libqb.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 3a1d931c0..a2319e9ce 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -11217,8 +11217,7 @@ static bool clear_console(void) return false; ret = (GetConsoleScreenBufferInfo(hConsole, &csbi) && FillConsoleOutputCharacterA(console, ' ', - csbi.dwSize.X * csbi.dwSize.Y, origin, &nCharsWritten) && - SetConsoleCursorPosition(hConsole, origin)); + csbi.dwSize.X * csbi.dwSize.Y, origin, &nCharsWritten)); CloseHandle(console); return ret; } @@ -11241,8 +11240,6 @@ static int putc_tty(int c) static bool clear_console(void) { int err; - if (!isatty(fileno(stdout))) - return false; ttyfd = open("/dev/tty", O_RDWR); if (ttyfd == -1) { // No controlling TTY for the process?