enable debug messages, some formatting

This commit is contained in:
DubbleClick
2023-11-14 00:02:06 +01:00
parent af605f896b
commit f88ec9a6e6
3 changed files with 5 additions and 13 deletions
+2 -3
View File
@@ -2,7 +2,6 @@
#include "uMod_Main.h"
#include <Windows.h>
#include <Psapi.h>
#include <TlHelp32.h>
#pragma comment(lib, "Psapi.lib")
//#include "detours.h"
//#include "detourxs/detourxs/detourxs.h"
@@ -51,7 +50,7 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH: {
#ifdef BUILD_TYPE_DEBUG
#ifdef _DEBUG
AllocConsole();
SetConsoleTitleA("uMod Console");
freopen_s(&stdout_proxy, "CONOUT$", "w", stdout);
@@ -210,7 +209,7 @@ void ExitInstance()
gl_hOriginalDll = nullptr;
}
#ifdef BUILD_TYPE_DEBUG
#ifdef _DEBUG
if (stdout_proxy)
fclose(stdout_proxy);
if (stderr_proxy)