mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Disabled launch animations temporarily as they don't work as expected and a proper fix is planned for later.
This commit is contained in:
parent
8b3d2c7ef0
commit
34da214a8d
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <SDL2/SDL_timer.h>
|
||||
#endif
|
||||
|
||||
FileData::FileData(
|
||||
FileType type,
|
||||
const std::string& path,
|
||||
|
@ -550,6 +554,9 @@ void FileData::launchGame(Window* window)
|
|||
#ifdef _WIN64
|
||||
else {
|
||||
window->setLaunchedGame();
|
||||
// Temporary hack to stop the user from sending any input to ES while
|
||||
// the game is launching.
|
||||
SDL_Delay(3000);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -56,8 +56,6 @@ public:
|
|||
|
||||
void apply(float t) override
|
||||
{
|
||||
// TEMPORARY, disabled as it causes flicker when launching games.
|
||||
return;
|
||||
cameraOut = Transform4x4f::Identity();
|
||||
|
||||
float zoom = Math::lerp(1.0, 4.25f, t*t);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
//
|
||||
// MoveCameraAnimation.h
|
||||
//
|
||||
// Animation to play when moving the camera, used by the slide transition style.
|
||||
// Animation to play when moving the camera, used by the slide transition style
|
||||
// (when moving between gamelists using quick system select).
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -264,46 +264,53 @@ void ViewController::launch(FileData* game, Vector3f center)
|
|||
// Let launch sound play to the end before launching game.
|
||||
while (NavigationSounds::getInstance()->isPlayingThemeNavigationSound(LAUNCHSOUND));
|
||||
|
||||
if (transition_style == "fade") {
|
||||
// Fade out, launch game, fade back in.
|
||||
auto fadeFunc = [this](float t) {
|
||||
mFadeOpacity = Math::lerp(0.0f, 1.0f, t);
|
||||
};
|
||||
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc] {
|
||||
game->launchGame(mWindow);
|
||||
setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this] {
|
||||
mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
}
|
||||
else if (transition_style == "slide") {
|
||||
// Move camera to zoom in on center + fade out, launch game, come back in.
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 1500), 0,
|
||||
[this, origCamera, center, game] {
|
||||
game->launchGame(mWindow);
|
||||
mCamera = origCamera;
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, [this] {
|
||||
mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
}
|
||||
// Instant
|
||||
else {
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0,
|
||||
[this, origCamera, center, game] {
|
||||
game->launchGame(mWindow);
|
||||
mCamera = origCamera;
|
||||
setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0,
|
||||
[this] { mLockInput = false; }, true);
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
if (mCurrentView)
|
||||
mCurrentView->onShow();
|
||||
});
|
||||
}
|
||||
game->launchGame(mWindow);
|
||||
mLockInput = false;
|
||||
this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
|
||||
// TEMPORARY - disabled the launch animations as they don't work properly and more
|
||||
// work is needed to fix them.
|
||||
//
|
||||
// if (transition_style == "fade") {
|
||||
// // Fade out, launch game, fade back in.
|
||||
// auto fadeFunc = [this](float t) {
|
||||
// mFadeOpacity = Math::lerp(0.0f, 1.0f, t);
|
||||
// };
|
||||
// setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this, game, fadeFunc] {
|
||||
// game->launchGame(mWindow);
|
||||
// setAnimation(new LambdaAnimation(fadeFunc, 800), 0, [this] {
|
||||
// mLockInput = false; }, true);
|
||||
// this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
// if (mCurrentView)
|
||||
// mCurrentView->onShow();
|
||||
// });
|
||||
// }
|
||||
// else if (transition_style == "slide") {
|
||||
// // Move camera to zoom in on center + fade out, launch game, come back in.
|
||||
// setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 1500), 0,
|
||||
// [this, origCamera, center, game] {
|
||||
// game->launchGame(mWindow);
|
||||
// mCamera = origCamera;
|
||||
// setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 600), 0, [this] {
|
||||
// mLockInput = false; }, true);
|
||||
// this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
// if (mCurrentView)
|
||||
// mCurrentView->onShow();
|
||||
// });
|
||||
// }
|
||||
// // Instant
|
||||
// else {
|
||||
// setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0,
|
||||
// [this, origCamera, center, game] {
|
||||
// game->launchGame(mWindow);
|
||||
// mCamera = origCamera;
|
||||
// setAnimation(new LaunchAnimation(mCamera, mFadeOpacity, center, 10), 0,
|
||||
// [this] { mLockInput = false; }, true);
|
||||
// this->onFileChanged(game, FILE_METADATA_CHANGED);
|
||||
// if (mCurrentView)
|
||||
// mCurrentView->onShow();
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
void ViewController::removeGameListView(SystemData* system)
|
||||
|
|
Loading…
Reference in a new issue