No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Initialize.cpp 901B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "il2cpp-config.h"
  2. #include "os/Initialize.h"
  3. #if IL2CPP_TARGET_WINDOWS
  4. #include "os/Environment.h"
  5. #include "os/WindowsRuntime.h"
  6. #include "DllMain.h"
  7. #include <crtdbg.h>
  8. void il2cpp::os::Initialize()
  9. {
  10. #ifdef _DEBUG
  11. std::string buildMachine = il2cpp::os::Environment::GetEnvironmentVariable("UNITY_THISISABUILDMACHINE");
  12. if (!buildMachine.empty())
  13. {
  14. _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
  15. _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
  16. _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
  17. _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT);
  18. }
  19. #endif
  20. // This is needed so we could extract exception text from bad hresults
  21. os::WindowsRuntime::EnableErrorReporting();
  22. os::InitializeDllMain();
  23. }
  24. #if !IL2CPP_TARGET_WINRT
  25. void il2cpp::os::Uninitialize()
  26. {
  27. }
  28. #endif
  29. #endif