BsEditorExec.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include <iostream>
  4. #include <stdio.h>
  5. #include "BsEditorApplication.h"
  6. #include "Error/BsCrashHandler.h"
  7. #if BS_PLATFORM == BS_PLATFORM_WIN32
  8. #include <windows.h>
  9. using namespace bs;
  10. int CALLBACK WinMain(
  11. _In_ HINSTANCE hInstance,
  12. _In_ HINSTANCE hPrevInstance,
  13. _In_ LPSTR lpCmdLine,
  14. _In_ int nCmdShow
  15. )
  16. {
  17. CrashHandler::startUp();
  18. __try
  19. {
  20. EditorApplication::startUp();
  21. EditorApplication::instance().runMainLoop();
  22. EditorApplication::shutDown();
  23. }
  24. __except (gCrashHandler().reportCrash(GetExceptionInformation()))
  25. {
  26. PlatformUtility::terminate(true);
  27. }
  28. CrashHandler::shutDown();
  29. return 0;
  30. }
  31. #else
  32. using namespace bs;
  33. int main()
  34. {
  35. EditorApplication::startUp();
  36. EditorApplication::instance().runMainLoop();
  37. EditorApplication::shutDown();
  38. }
  39. #endif // End BS_PLATFORM