mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Check specific outputs for isatty (#12980)
This commit is contained in:
parent
70a82b0784
commit
4da8a18c8c
1 changed files with 5 additions and 4 deletions
|
@ -124,9 +124,10 @@ public:
|
|||
m_stream(stream)
|
||||
{
|
||||
#if !defined(_WIN32)
|
||||
is_tty = isatty(fileno(stdout));
|
||||
#else
|
||||
is_tty = false;
|
||||
if (&stream == &std::cout)
|
||||
is_tty = isatty(STDOUT_FILENO);
|
||||
else if (&stream == &std::cerr)
|
||||
is_tty = isatty(STDERR_FILENO);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -134,7 +135,7 @@ public:
|
|||
|
||||
private:
|
||||
std::ostream &m_stream;
|
||||
bool is_tty;
|
||||
bool is_tty = false;
|
||||
};
|
||||
|
||||
class FileLogOutput : public ICombinedLogOutput {
|
||||
|
|
Loading…
Add table
Reference in a new issue