| 13 | extern "C" __declspec( dllexport ) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001; |
| 14 | |
| 15 | extern "C" int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, char* /*lpCmdLine*/, int /*nCmdShow*/) |
| 16 | { |
| 17 | // Initialize getting stacktraces before loading DLLs |
| 18 | // https://stackoverflow.com/q/78468776/7325599 |
| 19 | (void)MR::getCurrentStacktraceInline(); |
| 20 | |
| 21 | auto args = MR::ConvertArgv(); |
| 22 | std::vector<char*> argv; |
| 23 | argv.reserve( args.size() ); |
| 24 | for ( auto& arg : args ) |
| 25 | argv.push_back( arg.data() ); |
| 26 | |
| 27 | // Init the viewer |
| 28 | MR::Viewer::LaunchParams launchParams; |
| 29 | launchParams.enableTransparentBackground = true;// default false, set true for MR and MRE |
| 30 | launchParams.name = std::string( MR_PROJECT_NAME ); |
| 31 | launchParams.splashWindow = std::make_shared<MR::DefaultSplashWindow>(); |
| 32 | launchParams.showMRVersionInTitle = true; |
| 33 | launchParams.argc = int( argv.size() ); |
| 34 | launchParams.argv = argv.data(); |
| 35 | |
| 36 | MR::Viewer::parseLaunchParams( launchParams ); |
| 37 | |
| 38 | // Starts console if needed, free it on destructor |
| 39 | MR::ConsoleRunner console( launchParams.console ); |
| 40 | |
| 41 | return MR::launchDefaultViewer( launchParams, MR::ViewerSetup() ); |
| 42 | } |
| 43 | |
| 44 | #else //Unix |
| 45 |
nothing calls this directly
no test coverage detected