Beating Windows and MSVC further into submission.

This commit is contained in:
2024-07-01 14:28:18 -04:00
parent 47caaba587
commit 9d36f07717
2 changed files with 9 additions and 2 deletions

View File

@@ -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

View File

@@ -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);