fix: MSVC defines _DEBUG, not DEBUG
This commit is contained in:
		
							parent
							
								
									051da9e354
								
							
						
					
					
						commit
						65c761345f
					
				@ -8,7 +8,7 @@
 | 
			
		||||
FILEVERSION     2,6,0,2100
 | 
			
		||||
PRODUCTVERSION  2,6,0,2100
 | 
			
		||||
FILEFLAGSMASK   VS_FF_DEBUG
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
#ifdef _DEBUG
 | 
			
		||||
FILEFLAGS       VS_FF_DEBUG
 | 
			
		||||
#else
 | 
			
		||||
FILEFLAGS       0
 | 
			
		||||
 | 
			
		||||
@ -19,6 +19,9 @@
 | 
			
		||||
    along with Grafx2; if not, see <http://www.gnu.org/licenses/>
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_VER)
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(USE_SDL2)
 | 
			
		||||
#include <SDL.h>
 | 
			
		||||
#endif
 | 
			
		||||
@ -34,7 +37,7 @@ extern void GFX2_Log(GFX2_Log_priority_T priority, const char * fmt, ...)
 | 
			
		||||
  va_start(ap, fmt);
 | 
			
		||||
  GFX2_LogV(priority, fmt, ap);
 | 
			
		||||
  va_end(ap);
 | 
			
		||||
#if defined(_MSC_VER) && defined(DEBUG)
 | 
			
		||||
#if defined(_MSC_VER) && defined(_DEBUG)
 | 
			
		||||
  {
 | 
			
		||||
    char message[1024];
 | 
			
		||||
    va_start(ap, fmt);
 | 
			
		||||
@ -47,7 +50,7 @@ extern void GFX2_Log(GFX2_Log_priority_T priority, const char * fmt, ...)
 | 
			
		||||
 | 
			
		||||
extern void GFX2_LogV(GFX2_Log_priority_T priority, const char * fmt, va_list ap)
 | 
			
		||||
{
 | 
			
		||||
#if !defined(DEBUG)
 | 
			
		||||
#if !defined(_DEBUG)
 | 
			
		||||
  if ((unsigned)GFX2_verbosity_level < (unsigned)priority)
 | 
			
		||||
    return;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user