mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-07 12:39:09 +01:00
yuzu/loading_screen: Resolve runtime Qt string formatting warnings
In our error console, when loading a game, the strings: QString::arg: Argument missing: "Loading...", 0 QString::arg: Argument missing: "Launching...", 0 would occasionally pop up when the loading screen was running. This was due to the strings being assumed to have formatting indicators in them, however only two out of the four strings actually have them. This only applies the arguments to the strings that have formatting specifiers provided, which avoids these warnings from occurring.
This commit is contained in:
parent
f14328bf0a
commit
b73e433dff
1 changed files with 6 additions and 1 deletions
|
@ -192,7 +192,12 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
|
|||
}
|
||||
|
||||
// update labels and progress bar
|
||||
if (stage == VideoCore::LoadCallbackStage::Decompile ||
|
||||
stage == VideoCore::LoadCallbackStage::Build) {
|
||||
ui->stage->setText(stage_translations[stage].arg(value).arg(total));
|
||||
} else {
|
||||
ui->stage->setText(stage_translations[stage]);
|
||||
}
|
||||
ui->value->setText(estimate);
|
||||
ui->progress_bar->setValue(static_cast<int>(value));
|
||||
previous_time = now;
|
||||
|
|
Loading…
Reference in a new issue