diff --git a/inc/utest.h b/inc/utest.h index d5134885..60175d58 100644 --- a/inc/utest.h +++ b/inc/utest.h @@ -61,6 +61,7 @@ class KWA : public KWA_PAR #define kszProductsKey PszLit("Software\\Microsoft\\Microsoft Kids\\3D Movie Maker\\Products") #define kszUserDataValue PszLit("UserData") #define kszBetterSpeedValue PszLit("BetterSpeed") +#define kszSkipSplashScreenValue PszLit("SkipSplashScreen") // FGetSetRegKey flags enum @@ -167,7 +168,7 @@ class APP : public APP_PAR bool _FGetUserDirectories(void); bool _FReadUserData(void); bool _FWriteUserData(void); - bool _FDisplayHomeLogo(void); + bool _FDisplayHomeLogo(bool fSkipSplashScreen); bool _FDetermineIfSlowCPU(void); bool _FOpenResourceFile(void); bool _FInitKidworld(void); diff --git a/src/studio/utest.cpp b/src/studio/utest.cpp index b532bfa3..debcb091 100644 --- a/src/studio/utest.cpp +++ b/src/studio/utest.cpp @@ -173,6 +173,9 @@ bool APP::_FInit(ulong grfapp, ulong grfgob, long ginDef) ulong tsSplashScreen; FNI fniUserDoc; long fFirstTimeUser; + long fSkipSplashScreen = fFalse; + + FGetSetRegKey(kszSkipSplashScreenValue, &fSkipSplashScreen, size(fSkipSplashScreen), fregSetDefault); // Only allow one copy of 3DMM to run at a time: if (_FAppAlreadyRunning()) @@ -286,12 +289,14 @@ bool APP::_FInit(ulong grfapp, ulong grfgob, long ginDef) goto LFail; } - if (!_FDisplayHomeLogo()) + + if (!_FDisplayHomeLogo(fSkipSplashScreen)) { _FGenericError(PszLit("_FDisplayHomeLogo")); _fDontReportInitFailure = fTrue; goto LFail; } + tsHomeLogo = TsCurrent(); if (!_FDetermineIfSlowCPU()) @@ -315,22 +320,31 @@ bool APP::_FInit(ulong grfapp, ulong grfgob, long ginDef) goto LFail; } - while (TsCurrent() - tsHomeLogo < kdtsHomeLogo) - ; // spin until home logo has been up long enough + if (!fSkipSplashScreen) + { + while (TsCurrent() - tsHomeLogo < kdtsHomeLogo) + ; // spin until home logo has been up long enough + } - if (!_FShowSplashScreen()) + if (!fSkipSplashScreen) { - _FGenericError(PszLit("_FShowSplashScreen")); - _fDontReportInitFailure = fTrue; - goto LFail; + if (!_FShowSplashScreen()) + { + _FGenericError(PszLit("_FShowSplashScreen")); + _fDontReportInitFailure = fTrue; + goto LFail; + } } tsSplashScreen = TsCurrent(); - if (!_FPlaySplashSound()) + if (!fSkipSplashScreen) { - _FGenericError(PszLit("_FPlaySplashSound")); - _fDontReportInitFailure = fTrue; - goto LFail; + if (!_FPlaySplashSound()) + { + _FGenericError(PszLit("_FPlaySplashSound")); + _fDontReportInitFailure = fTrue; + goto LFail; + } } if (!_FGetUserName()) @@ -361,9 +375,12 @@ bool APP::_FInit(ulong grfapp, ulong grfgob, long ginDef) goto LFail; } - while (TsCurrent() - tsSplashScreen < kdtsSplashScreen) - ; // spin until splash screen has been up long enough - Pkwa()->SetMbmp(pvNil); // bring down splash screen + if (!fSkipSplashScreen) + { + while (TsCurrent() - tsSplashScreen < kdtsSplashScreen) + ; // spin until splash screen has been up long enough + Pkwa()->SetMbmp(pvNil); // bring down splash screen + } // If the user specified a doc on the command line, go straight // to the studio. Otherwise, start the building. @@ -1459,7 +1476,7 @@ bool APP::FGetSetRegKey(PSZ pszValueName, void *pvData, long cbData, ulong grfre /*************************************************************************** Set the palette and bring up the Microsoft Home Logo ***************************************************************************/ -bool APP::_FDisplayHomeLogo(void) +bool APP::_FDisplayHomeLogo(bool fSkipSplashScreen) { AssertBaseThis(0); AssertPo(_pcfl, 0); @@ -1478,14 +1495,17 @@ bool APP::_FDisplayHomeLogo(void) GPT::SetActiveColors(pglclr, fpalIdentity); ReleasePpo(&pglclr); - if (!_pcfl->FFind(kctgMbmp, kcnoMbmpHomeLogo, &blck)) - return fFalse; - pmbmp = MBMP::PmbmpRead(&blck); - if (pvNil == pmbmp) - return fFalse; - _pkwa->SetMbmp(pmbmp); - ReleasePpo(&pmbmp); - UpdateMarked(); + if (!fSkipSplashScreen) { + if (!_pcfl->FFind(kctgMbmp, kcnoMbmpHomeLogo, &blck)) + return fFalse; + pmbmp = MBMP::PmbmpRead(&blck); + if (pvNil == pmbmp) + return fFalse; + _pkwa->SetMbmp(pmbmp); + ReleasePpo(&pmbmp); + UpdateMarked(); + } + return fTrue; }