mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-21 20:03:25 +02:00
Fix mingw compile error and warnings
This commit is contained in:
parent
3ca0af8bb3
commit
372245e0b5
@ -120,8 +120,8 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
|
|||||||
map.loadFromData(buffer.data(), buffer.size());
|
map.loadFromData(buffer.data(), buffer.size());
|
||||||
ui->banner->setPixmap(map);
|
ui->banner->setPixmap(map);
|
||||||
#else
|
#else
|
||||||
backing_mem =
|
backing_mem = std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()),
|
||||||
std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()), buffer.size());
|
static_cast<int>(buffer.size()));
|
||||||
backing_buf = std::make_unique<QBuffer>(backing_mem.get());
|
backing_buf = std::make_unique<QBuffer>(backing_mem.get());
|
||||||
backing_buf->open(QIODevice::ReadOnly);
|
backing_buf->open(QIODevice::ReadOnly);
|
||||||
animation = std::make_unique<QMovie>(backing_buf.get(), QByteArray());
|
animation = std::make_unique<QMovie>(backing_buf.get(), QByteArray());
|
||||||
@ -132,7 +132,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
|
|||||||
}
|
}
|
||||||
if (loader.ReadLogo(buffer) == Loader::ResultStatus::Success) {
|
if (loader.ReadLogo(buffer) == Loader::ResultStatus::Success) {
|
||||||
QPixmap map;
|
QPixmap map;
|
||||||
map.loadFromData(buffer.data(), buffer.size());
|
map.loadFromData(buffer.data(), static_cast<uint>(buffer.size()));
|
||||||
ui->logo->setPixmap(map);
|
ui->logo->setPixmap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
|
|||||||
}
|
}
|
||||||
// update the max of the progress bar if the number of shaders change
|
// update the max of the progress bar if the number of shaders change
|
||||||
if (total != previous_total) {
|
if (total != previous_total) {
|
||||||
ui->progress_bar->setMaximum(total);
|
ui->progress_bar->setMaximum(static_cast<int>(total));
|
||||||
previous_total = total;
|
previous_total = total;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
|
|||||||
// update labels and progress bar
|
// update labels and progress bar
|
||||||
ui->stage->setText(stage_translations[stage].arg(value).arg(total));
|
ui->stage->setText(stage_translations[stage].arg(value).arg(total));
|
||||||
ui->value->setText(estimate);
|
ui->value->setText(estimate);
|
||||||
ui->progress_bar->setValue(value);
|
ui->progress_bar->setValue(static_cast<int>(value));
|
||||||
previous_time = now;
|
previous_time = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ private:
|
|||||||
VideoCore::LoadCallbackStage previous_stage;
|
VideoCore::LoadCallbackStage previous_stage;
|
||||||
|
|
||||||
QGraphicsOpacityEffect* opacity_effect = nullptr;
|
QGraphicsOpacityEffect* opacity_effect = nullptr;
|
||||||
std::unique_ptr<QPropertyAnimation> fadeout_animation = nullptr;
|
std::unique_ptr<QPropertyAnimation> fadeout_animation;
|
||||||
|
|
||||||
// Definitions for the differences in text and styling for each stage
|
// Definitions for the differences in text and styling for each stage
|
||||||
std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
|
std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
|
||||||
|
Loading…
Reference in New Issue
Block a user