Skip to content

Commit

Permalink
Add colors to console for macOS (cuberite#4303)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 authored and peterbell10 committed Oct 15, 2018
1 parent 4727ed2 commit 2010a2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/LoggerListeners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#endif


#if defined(_WIN32) || defined (__linux)
#if defined(_WIN32) || defined (__linux) || defined (__APPLE__)
class cColouredConsoleListener
: public cLogger::cListener
{
Expand Down Expand Up @@ -101,11 +101,11 @@



#elif defined (__linux)
#elif defined (__linux) || defined (__APPLE__)



class cLinuxConsoleListener
class cANSIConsoleListener
: public cColouredConsoleListener
{
public:
Expand Down Expand Up @@ -228,11 +228,11 @@ std::unique_ptr<cLogger::cListener> MakeConsoleListener(bool a_IsService)
{
return cpp14::make_unique<cVanillaCPPConsoleListener>();
}
#elif defined (__linux) && !defined(ANDROID)
#elif (defined (__linux) && !defined(ANDROID)) || defined (__APPLE__)
// TODO: lookup terminal in terminfo
if (isatty(fileno(stdout)))
{
return cpp14::make_unique<cLinuxConsoleListener>();
return cpp14::make_unique<cANSIConsoleListener>();
}
else
{
Expand Down

0 comments on commit 2010a2b

Please sign in to comment.