From 5b181976ce353132905166d169bd90983ad53be9 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Mon, 2 Jul 2018 17:13:45 -0500 Subject: [PATCH] fix conversion warnings --- src/citra_qt/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index ff16a00068..97c9e5666a 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -931,6 +931,7 @@ void GMainWindow::OnMenuInstallCIA() { ui.action_Install_CIA->setEnabled(false); progress_bar->show(); + progress_bar->setMaximum(INT_MAX); QtConcurrent::run([&, filepaths] { QString current_path; @@ -948,8 +949,8 @@ void GMainWindow::OnMenuInstallCIA() { } void GMainWindow::OnUpdateProgress(size_t written, size_t total) { - progress_bar->setMaximum(total); - progress_bar->setValue(written); + progress_bar->setValue( + static_cast(INT_MAX * (static_cast(written) / static_cast(total)))); } void GMainWindow::OnCIAInstallReport(Service::AM::InstallStatus status, QString filepath) {