mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Merge pull request #221 from hex007/fix-blank-screen-217
Fixes blank screen on key press while exiting game
This commit is contained in:
commit
e0eb0f6ae1
|
@ -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<float>(0.0f, 1.0f, t*t*t + 1);
|
||||
mFadeOpacity = lerp<float>(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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue