*/
#include "main.h"
+#include "globaldefs.h"
#include "version.h"
#include "referencecache.h"
#include "stacktrace.h"
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
#include <windows.h>
#endif
}
}
-#if defined ( _DEBUG ) && defined ( WIN32 ) && defined ( _MSC_VER )
+#if GDEF_COMPILER_MSVC && GDEF_DEBUG
#include "crtdbg.h"
#endif
void crt_init(){
-#if defined ( _DEBUG ) && defined ( WIN32 ) && defined ( _MSC_VER )
+#if GDEF_COMPILER_MSVC && GDEF_DEBUG
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
}
globalErrorStream() << m_buffer.c_str();
if ( !m_lock.locked() ) {
ScopedLock lock( m_lock );
-#if defined _DEBUG
+#if GDEF_DEBUG
m_buffer << "Break into the debugger?\n";
bool handled = ui::root.alert( m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::YESNO, ui::alert_icon::Error ) == ui::alert_response::NO;
m_buffer.clear();
// make something idiot proof and someone will make better idiots, this may be overkill
// let's leave it disabled in debug mode in any case
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=431
-#ifndef _DEBUG
+#if !GDEF_DEBUG
#define CHECK_VERSION
#endif
#ifdef CHECK_VERSION
}
// in debug, never prompt to clean registry, turn console logging auto after a failed start
-#if !defined( _DEBUG )
+#if !GDEF_DEBUG
StringOutputStream msg( 256 );
msg << "Radiant failed to start properly the last time it was run.\n"
"The failure may be related to current global preferences.\n"
}
// in debug, never prompt to clean registry, turn console logging auto after a failed start
-#if !defined( _DEBUG )
+#if !GDEF_DEBUG
StringOutputStream msg;
msg << "Radiant failed to start properly the last time it was run.\n"
"The failure may be caused by current preferences.\n"
streams_init();
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
HMODULE lib;
lib = LoadLibrary( "dwmapi.dll" );
if ( lib != 0 ) {