From d47c73dbcd0a314cf3346b9b1294063ed4a124c4 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 8 Jun 2021 11:21:53 -0500 Subject: Show Burn splash screen earlier. Make the initial Burn process show the splash screen, and show it before parsing the manifest. Fixes half of #5300 --- src/burn/engine/engine.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/burn/engine/engine.cpp') diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index 1314ddc6..4323b540 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -122,6 +122,11 @@ extern "C" HRESULT EngineRun( engineState.command.nCmdShow = nCmdShow; + if (BURN_MODE_ELEVATED != engineState.mode && BOOTSTRAPPER_DISPLAY_NONE < engineState.command.display && !engineState.command.hwndSplashScreen) + { + SplashScreenCreate(hInstance, NULL, &engineState.command.hwndSplashScreen); + } + // initialize platform layer PlatformInitialize(); @@ -452,7 +457,10 @@ static HRESULT RunUntrusted( hr = CoreAppendFileHandleSelfToCommandLine(wzCleanRoomBundlePath, &hFileSelf, &sczParameters, NULL); ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); - hr = StrAllocFormattedSecure(&sczParameters, L"%ls %ls", sczParameters, wzCommandLine); + hr = CoreAppendSplashScreenWindowToCommandLine(pEngineState->command.hwndSplashScreen, &sczParameters); + ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_SPLASH_SCREEN); + + hr = StrAllocConcatFormattedSecure(&sczParameters, L" %ls", wzCommandLine); ExitOnFailure(hr, "Failed to append original command line."); #ifdef ENABLE_UNELEVATE @@ -525,11 +533,6 @@ static HRESULT RunNormal( ExitFunction1(hr = S_OK); } - if (pEngineState->userExperience.fSplashScreen && BOOTSTRAPPER_DISPLAY_NONE < pEngineState->command.display) - { - SplashScreenCreate(hInstance, NULL, &pEngineState->command.hwndSplashScreen); - } - // Create a top-level window to handle system messages. hr = UiCreateMessageWindow(hInstance, pEngineState); ExitOnFailure(hr, "Failed to create the message window."); -- cgit v1.2.3-55-g6feb