Files
farnam_jhn 4588950b31
CMake Build / build (ubuntu-latest) (push) Has been cancelled
added files
2026-04-12 20:44:08 -07:00

17 lines
376 B
C++

#include <iostream>
#ifdef _WIN32
#include <windows.h>
#endif
void show_console_cursor(bool show) {
#if defined(_WIN32)
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(handle, &cci);
cci.bVisible = show;
SetConsoleCursorInfo(handle, &cci);
#else
std::cout << (show ? "\033[?25h" : "\033[?25l");
#endif
}