WIN32 macro -> _WIN32

This commit is contained in:
Connor McLaughlin
2021-06-28 20:16:48 +10:00
parent 489de3f9ce
commit 911e9a37f1
41 changed files with 123 additions and 123 deletions

View File

@ -3,7 +3,7 @@
#include <cstdlib>
#include <mutex>
#ifdef WIN32
#ifdef _WIN32
#include "windows_headers.h"
#include <intrin.h>
#include <tlhelp32.h>
@ -13,7 +13,7 @@ static std::mutex s_AssertFailedMutex;
static inline void FreezeThreads(void** ppHandle)
{
#ifdef WIN32
#ifdef _WIN32
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (hSnapshot != INVALID_HANDLE_VALUE)
{
@ -43,7 +43,7 @@ static inline void FreezeThreads(void** ppHandle)
static inline void ResumeThreads(void* pHandle)
{
#ifdef WIN32
#ifdef _WIN32
HANDLE hSnapshot = (HANDLE)pHandle;
if (pHandle != INVALID_HANDLE_VALUE)
{
@ -79,7 +79,7 @@ void Y_OnAssertFailed(const char* szMessage, const char* szFunction, const char*
char szMsg[512];
std::snprintf(szMsg, sizeof(szMsg), "%s in function %s (%s:%u)", szMessage, szFunction, szFile, uLine);
#ifdef WIN32
#ifdef _WIN32
SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
WriteConsoleA(GetStdHandle(STD_ERROR_HANDLE), szMsg, static_cast<DWORD>(std::strlen(szMsg)), NULL, NULL);
OutputDebugStringA(szMsg);
@ -114,7 +114,7 @@ void Y_OnPanicReached(const char* szMessage, const char* szFunction, const char*
char szMsg[512];
std::snprintf(szMsg, sizeof(szMsg), "%s in function %s (%s:%u)", szMessage, szFunction, szFile, uLine);
#ifdef WIN32
#ifdef _WIN32
SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
WriteConsoleA(GetStdHandle(STD_ERROR_HANDLE), szMsg, static_cast<DWORD>(std::strlen(szMsg)), NULL, NULL);
OutputDebugStringA(szMsg);