Made true color detection method static

This commit is contained in:
Bob Polis 2024-01-28 23:02:11 +01:00
parent d21cf0869e
commit ab8da360f8
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ void term::progress(int prefixlen,
*_out << ' ' << std::setw(3) << perc << '%'; *_out << ' ' << std::setw(3) << perc << '%';
} }
bool term::has_truecolor() const { bool term::has_truecolor() {
char* tc = getenv("COLORTERM"); char* tc = getenv("COLORTERM");
std::string colorterm {tc ? tc : ""}; std::string colorterm {tc ? tc : ""};
return colorterm.size() > 0 && (colorterm == "truecolor" || colorterm == "24bit"); return colorterm.size() > 0 && (colorterm == "truecolor" || colorterm == "24bit");

View File

@ -25,7 +25,7 @@ namespace sc {
double cur, double cur,
double total) const; double total) const;
bool has_truecolor() const; static bool has_truecolor();
}; };
class cursor_hider { class cursor_hider {