diff options
Diffstat (limited to 'src/yuzu/loading_screen.cpp')
-rw-r--r-- | src/yuzu/loading_screen.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index b001b8c23..e263a07a7 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp @@ -1,24 +1,16 @@ -// Copyright 2019 yuzu Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include <unordered_map> #include <QBuffer> #include <QByteArray> #include <QGraphicsOpacityEffect> -#include <QHBoxLayout> #include <QIODevice> #include <QImage> -#include <QLabel> #include <QPainter> -#include <QPalette> #include <QPixmap> -#include <QProgressBar> #include <QPropertyAnimation> #include <QStyleOption> -#include <QTime> -#include <QtConcurrent/QtConcurrentRun> -#include "common/logging/log.h" #include "core/frontend/framebuffer_layout.h" #include "core/loader/loader.h" #include "ui_loading_screen.h" @@ -155,6 +147,10 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size ui->progress_bar->setMaximum(static_cast<int>(total)); previous_total = total; } + // Reset the progress bar ranges if compilation is done + if (stage == VideoCore::LoadCallbackStage::Complete) { + ui->progress_bar->setRange(0, 0); + } QString estimate; // If theres a drastic slowdown in the rate, then display an estimate @@ -191,7 +187,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size void LoadingScreen::paintEvent(QPaintEvent* event) { QStyleOption opt; - opt.init(this); + opt.initFrom(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); QWidget::paintEvent(event); |