fix: MSVC defines _DEBUG, not DEBUG

This commit is contained in:
Thomas Bernard
2018-09-16 00:04:47 +02:00
parent 051da9e354
commit 65c761345f
3 changed files with 8 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ void Error_function(int error_code, const char *filename, int line_number, const
snprintf(msg_buffer, sizeof(msg_buffer), "Error number %d occured in file %s, line %d, function %s.\n", error_code, filename,line_number,function_name);
fputs(msg_buffer, stderr);
#if defined(_MSC_VER) && defined(DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
OutputDebugStringA(msg_buffer);
#endif
@@ -277,7 +277,7 @@ void Error_function(int error_code, const char *filename, int line_number, const
{
fputs(msg, stderr);
#if defined(WIN32)
#if defined(DEBUG)
#if defined(_DEBUG)
OutputDebugStringA(msg);
#endif
MessageBoxA(GFX2_Get_Window_Handle(), msg, "GrafX2 error", MB_OK | MB_ICONERROR);