diff options
author | James Rowe <jroweboy@gmail.com> | 2019-01-21 09:20:16 -0700 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2019-01-21 09:20:16 -0700 |
commit | 3ca0af8bb3dfd7c67320a842db8eabe198058bd6 (patch) | |
tree | 5c61bb08f161af8450000093f355e0f6462a80c8 /src/yuzu/main.cpp | |
parent | 3740adb6f582963e50afba0a248163e3a37dd659 (diff) |
Add fade out effect to the loading screen
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f1effb857c..2c3e27c2e7 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -415,6 +415,13 @@ void GMainWindow::InitializeWidgets() { loading_screen = new LoadingScreen(this); loading_screen->hide(); ui.horizontalLayout->addWidget(loading_screen); + connect(loading_screen, &LoadingScreen::Hidden, [&] { + loading_screen->Clear(); + if (emulation_running) { + render_window->show(); + render_window->setFocus(); + } + }); // Create status bar message_label = new QLabel(); @@ -1513,10 +1520,7 @@ void GMainWindow::OnStopGame() { } void GMainWindow::OnLoadComplete() { - loading_screen->hide(); - loading_screen->Clear(); - render_window->show(); - render_window->setFocus(); + loading_screen->OnLoadComplete(); } void GMainWindow::OnMenuReportCompatibility() { |