mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +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
|
// fade out, launch game, fade back in
|
||||||
auto fadeFunc = [this](float t) {
|
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);
|
mFadeOpacity = lerp<float>(0.0f, 1.0f, t);
|
||||||
};
|
};
|
||||||
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc]
|
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc]
|
||||||
{
|
{
|
||||||
game->launchGame(mWindow);
|
game->launchGame(mWindow);
|
||||||
mLockInput = false;
|
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this] { mLockInput = false; }, true);
|
||||||
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, nullptr, true);
|
|
||||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||||
});
|
});
|
||||||
} else if (transition_style == "slide"){
|
} else if (transition_style == "slide"){
|
||||||
|
@ -256,17 +253,15 @@ void ViewController::launch(FileData* game, Eigen::Vector3f center)
|
||||||
{
|
{
|
||||||
game->launchGame(mWindow);
|
game->launchGame(mWindow);
|
||||||
mCamera = origCamera;
|
mCamera = origCamera;
|
||||||
mLockInput = false;
|
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, [this] { mLockInput = false; }, true);
|
||||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, nullptr, true);
|
|
||||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||||
});
|
});
|
||||||
} else {
|
} else { // instant
|
||||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this, origCamera, center, game]
|
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this, origCamera, center, game]
|
||||||
{
|
{
|
||||||
game->launchGame(mWindow);
|
game->launchGame(mWindow);
|
||||||
mCamera = origCamera;
|
mCamera = origCamera;
|
||||||
mLockInput = false;
|
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, [this] { mLockInput = false; }, true);
|
||||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0, nullptr, true);
|
|
||||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue