mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-04 20:57:49 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/* Copyright 2003-2005 ROBLOX Corporation, All Rights Reserved */
|
||||
|
||||
#include "rbx/Debug.h"
|
||||
#include "RbxAssert.h"
|
||||
#include "RbxFormat.h"
|
||||
#include <algorithm>
|
||||
|
||||
const int CRASHONASSERT = 255;
|
||||
|
||||
void ReleaseAssert(int channel, const char* msg) {
|
||||
if(channel == CRASHONASSERT)
|
||||
RBXCRASH(msg);
|
||||
else
|
||||
FLog::FastLog(channel, msg, 0);
|
||||
}
|
||||
|
||||
namespace RBX
|
||||
{
|
||||
// overload this in the debugger to pass by the crash
|
||||
volatile bool Debugable::doCrashEnabled = true;
|
||||
|
||||
void Debugable::doCrash()
|
||||
{
|
||||
if(doCrashEnabled)
|
||||
{
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
|
||||
#pragma optimize ("", off )
|
||||
|
||||
void Debugable::doCrash(const char* message)
|
||||
{
|
||||
#if defined(RBX_PLATFORM_DURANGO)
|
||||
OutputDebugStringA("ASSERTION FAILED: ");
|
||||
OutputDebugStringA(message);
|
||||
OutputDebugStringA("\n");
|
||||
if (!IsDebuggerPresent())
|
||||
return;
|
||||
#endif
|
||||
if (doCrashEnabled)
|
||||
{
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
|
||||
#pragma optimize ("", on )
|
||||
|
||||
} // rbx namespace
|
||||
Reference in New Issue
Block a user