main_windows.cpp 986 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. // LY Game Gem crash uploader extension - Windows
  9. #include <AzCore/Debug/Trace.h>
  10. #include <AzCore/PlatformIncl.h>
  11. #include <handler/handler_main.h>
  12. #include <tools/tool_support.h>
  13. #include <Uploader/CrashUploader.h>
  14. namespace
  15. {
  16. int HandlerMain(int argc, char* argv[])
  17. {
  18. O3de::InstallCrashUploader(argc, argv);
  19. LOG(ERROR) << "Initializing windows game crash uploader logging";
  20. int resultCode = crashpad::HandlerMain(argc, argv, O3de::CrashUploader::GetCrashUploader()->GetUserStreamSources());
  21. return resultCode;
  22. }
  23. }
  24. int APIENTRY wWinMain(HINSTANCE, HINSTANCE, [[maybe_unused]] wchar_t* lpCmdLine, int)
  25. {
  26. const AZ::Debug::Trace tracer;
  27. return crashpad::ToolSupport::Wmain(__argc, __wargv, HandlerMain);
  28. }