Beating Windows and MSVC further into submission.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
// NT color codes taken from windows.h / consoleapi2.h
|
||||
|
||||
#if WIN32
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef WORD
|
||||
#define WORD unsigned short
|
||||
|
@@ -3,6 +3,10 @@
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace jlog
|
||||
{
|
||||
|
||||
@@ -35,8 +39,7 @@ namespace jlog
|
||||
{
|
||||
// Beat windows into submission and make it use ANSI color codes
|
||||
// This also looks fugly, but it works
|
||||
#ifdef __WIN32
|
||||
#include <windows.h>
|
||||
#ifdef WIN32
|
||||
HANDLE handleOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD consoleMode;
|
||||
GetConsoleMode( handleOut , &consoleMode);
|
||||
|
Reference in New Issue
Block a user