SHADE_Y3/SHADE_Application/src/WinMain.cpp

29 lines
693 B
C++
Raw Normal View History

2022-09-05 13:55:52 +08:00
#include "SBpch.h"
#include <Engine/SHEngine.h>
#include "Application/SBApplication.h"
#define _CRTDBG_MAP_ALLOC
#include <cstdlib>
#include <crtdbg.h>
#ifdef _DEBUG
#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
// Replace _NORMAL_BLOCK with _CLIENT_BLOCK if you want the
// allocations to be of _CLIENT_BLOCK type
#else
#define DBG_NEW new
#endif
2022-09-05 13:55:52 +08:00
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpCmdLine, INT nCmdShow)
{
#ifndef SHEDITOR
ShowWindow(::GetConsoleWindow(), SW_HIDE);
#endif
SHADE::SHEngine::Run<Sandbox::SBApplication>();
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
2022-09-05 13:55:52 +08:00
return 0;
}