Add debug branding.

This commit is contained in:
momo5502
2016-01-16 15:03:09 +01:00
parent e884ae672a
commit 91a249380b
3 changed files with 14 additions and 2 deletions

View File

@ -49,7 +49,15 @@ namespace Components
Exception::Exception()
{
#ifndef DEBUG
#ifdef DEBUG
// Display DEBUG branding, so we know we're on a debug build
Renderer::OnFrame([] ()
{
Game::Font_s* font = Game::R_RegisterFont("fonts/normalFont");
float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
Game::R_AddCmdDrawText("DEBUG-BUILD", 0x7FFFFFFF, font, 15.0f, 10.0f + Game::R_TextHeight(font), 1.0f, 1.0f, 0.0f, color, 0);
});
#else
Utils::Hook::Set(0x6D70AC, Exception::SetUnhandledExceptionFilterStub);
SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
#endif