1
0
mirror of synced 2024-12-04 20:17:55 +01:00

Fix up logging to use debug string

This commit is contained in:
Rin 2022-07-09 11:20:35 +01:00
parent 1ca9a3e513
commit ee253d92f3
2 changed files with 10 additions and 4 deletions

View File

@ -120,7 +120,7 @@
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
@ -137,7 +137,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;OPENBANAPASS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>

View File

@ -4,11 +4,17 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
void log(const char* format, ...) void log(const char* format, ...)
{ {
char buffer[1024];
va_list args; va_list args;
va_start(args, format); va_start(args, format);
printf("[OpenBanapass] "); char fmt[1024] = "[OpenBanapass] ";
vprintf(format, args); strcat(fmt, format);
vsprintf(buffer, fmt, args);
OutputDebugStringA(buffer);
va_end(args); va_end(args);
} }