diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 2b7b9fbdd..2b0016b8c 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -239,15 +239,12 @@ void ViewController::launch(FileData* game, Eigen::Vector3f center) { // fade out, launch game, fade back in auto fadeFunc = [this](float t) { - //t -= 1; - //mFadeOpacity = lerp(0.0f, 1.0f, t*t*t + 1); mFadeOpacity = lerp(0.0f, 1.0f, t); }; setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc] { game->launchGame(mWindow); - mLockInput = false; - setAnimation(new LambdaAnimation(fadeFunc, 800), 0, nullptr, true); + setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this] { mLockInput = false; }, true); this->onFileChanged(game, FILE_METADATA_CHANGED); }); } else if (transition_style == "slide"){ @@ -256,17 +253,15 @@ void ViewController::launch(FileData* game, Eigen::Vector3f center) { game->launchGame(mWindow); mCamera = origCamera; - mLockInput = false; - setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, nullptr, true); + setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, [this] { mLockInput = false; }, true); this->onFileChanged(game, FILE_METADATA_CHANGED); }); - } else { + } else { // instant setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this, origCamera, center, game] { game->launchGame(mWindow); mCamera = origCamera; - mLockInput = false; - setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, nullptr, true); + setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this] { mLockInput = false; }, true); this->onFileChanged(game, FILE_METADATA_CHANGED); }); }