#include "SBpch.h" #include #include #include #include "Application/SBApplication.h" #define _CRTDBG_MAP_ALLOC #include #include #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 INT WINAPI wWinMain ( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ INT nCmdShow ) { const SHADE::SHLogger::Config LOGGER_CONFIG{ .directoryPath = "./logs/" }; auto logger = SHADE::SHLogger::Initialise(LOGGER_CONFIG); try { #ifndef SHEDITOR //ShowWindow(::GetConsoleWindow(), SW_HIDE); #endif SHLOG_REGISTER(logger) SHADE::SHEngine::Run(hInstance, hPrevInstance, lpCmdLine, nCmdShow); _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); } catch(...) { SHADE::SHExceptionHandler::HandleException(std::current_exception()); SHADE::SHLogger::Shutdown(); } SHADE::SHLogger::Shutdown(); return 0; }