summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar James Rowe2019-01-21 09:39:45 -0700
committerGravatar James Rowe2019-01-21 09:39:45 -0700
commit372245e0b52a738148a9291fbe448e3c61fa07bd (patch)
tree5f8cc2cc3a3bec5d09664d37c73a751774b6b65e /src
parentAdd fade out effect to the loading screen (diff)
downloadyuzu-372245e0b52a738148a9291fbe448e3c61fa07bd.tar.gz
yuzu-372245e0b52a738148a9291fbe448e3c61fa07bd.tar.xz
yuzu-372245e0b52a738148a9291fbe448e3c61fa07bd.zip
Fix mingw compile error and warnings
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/loading_screen.cpp10
-rw-r--r--src/yuzu/loading_screen.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp
index 76ef86b8c..8ac7f5059 100644
--- a/src/yuzu/loading_screen.cpp
+++ b/src/yuzu/loading_screen.cpp
@@ -120,8 +120,8 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
120 map.loadFromData(buffer.data(), buffer.size()); 120 map.loadFromData(buffer.data(), buffer.size());
121 ui->banner->setPixmap(map); 121 ui->banner->setPixmap(map);
122#else 122#else
123 backing_mem = 123 backing_mem = std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()),
124 std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()), buffer.size()); 124 static_cast<int>(buffer.size()));
125 backing_buf = std::make_unique<QBuffer>(backing_mem.get()); 125 backing_buf = std::make_unique<QBuffer>(backing_mem.get());
126 backing_buf->open(QIODevice::ReadOnly); 126 backing_buf->open(QIODevice::ReadOnly);
127 animation = std::make_unique<QMovie>(backing_buf.get(), QByteArray()); 127 animation = std::make_unique<QMovie>(backing_buf.get(), QByteArray());
@@ -132,7 +132,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
132 } 132 }
133 if (loader.ReadLogo(buffer) == Loader::ResultStatus::Success) { 133 if (loader.ReadLogo(buffer) == Loader::ResultStatus::Success) {
134 QPixmap map; 134 QPixmap map;
135 map.loadFromData(buffer.data(), buffer.size()); 135 map.loadFromData(buffer.data(), static_cast<uint>(buffer.size()));
136 ui->logo->setPixmap(map); 136 ui->logo->setPixmap(map);
137 } 137 }
138 138
@@ -163,7 +163,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
163 } 163 }
164 // update the max of the progress bar if the number of shaders change 164 // update the max of the progress bar if the number of shaders change
165 if (total != previous_total) { 165 if (total != previous_total) {
166 ui->progress_bar->setMaximum(total); 166 ui->progress_bar->setMaximum(static_cast<int>(total));
167 previous_total = total; 167 previous_total = total;
168 } 168 }
169 169
@@ -192,7 +192,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
192 // update labels and progress bar 192 // update labels and progress bar
193 ui->stage->setText(stage_translations[stage].arg(value).arg(total)); 193 ui->stage->setText(stage_translations[stage].arg(value).arg(total));
194 ui->value->setText(estimate); 194 ui->value->setText(estimate);
195 ui->progress_bar->setValue(value); 195 ui->progress_bar->setValue(static_cast<int>(value));
196 previous_time = now; 196 previous_time = now;
197} 197}
198 198
diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h
index 091e58eb7..801d08e1a 100644
--- a/src/yuzu/loading_screen.h
+++ b/src/yuzu/loading_screen.h
@@ -74,7 +74,7 @@ private:
74 VideoCore::LoadCallbackStage previous_stage; 74 VideoCore::LoadCallbackStage previous_stage;
75 75
76 QGraphicsOpacityEffect* opacity_effect = nullptr; 76 QGraphicsOpacityEffect* opacity_effect = nullptr;
77 std::unique_ptr<QPropertyAnimation> fadeout_animation = nullptr; 77 std::unique_ptr<QPropertyAnimation> fadeout_animation;
78 78
79 // Definitions for the differences in text and styling for each stage 79 // Definitions for the differences in text and styling for each stage
80 std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style; 80 std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style;