mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Fixed a small rounding issue in GuiThemeDownloader
This commit is contained in:
parent
9106013ade
commit
e1c78f1932
|
@ -528,14 +528,14 @@ void GuiThemeDownloader::update(int deltaTime)
|
||||||
if (mFetching) {
|
if (mFetching) {
|
||||||
int progress {mReceivedObjectsProgress != 1.0f ? 0 : 100};
|
int progress {mReceivedObjectsProgress != 1.0f ? 0 : 100};
|
||||||
if (mReceivedObjectsProgress != 1.0f) {
|
if (mReceivedObjectsProgress != 1.0f) {
|
||||||
progress = std::round(static_cast<int>(
|
progress = static_cast<int>(
|
||||||
glm::mix(0.0f, 100.0f, static_cast<float>(mReceivedObjectsProgress))));
|
std::round(glm::mix(0.0f, 100.0f, static_cast<float>(mReceivedObjectsProgress))));
|
||||||
const std::string progressText {std::to_string(progress) + "%"};
|
const std::string progressText {std::to_string(progress) + "%"};
|
||||||
mBusyAnim.setText(progressText);
|
mBusyAnim.setText(progressText);
|
||||||
}
|
}
|
||||||
else if (mReceivedObjectsProgress != 0.0f) {
|
else if (mReceivedObjectsProgress != 0.0f) {
|
||||||
progress = std::round(static_cast<int>(
|
progress = static_cast<int>(
|
||||||
glm::mix(0.0f, 100.0f, static_cast<float>(mResolveDeltaProgress))));
|
std::round(glm::mix(0.0f, 100.0f, static_cast<float>(mResolveDeltaProgress))));
|
||||||
const std::string progressText {std::to_string(progress) + "%"};
|
const std::string progressText {std::to_string(progress) + "%"};
|
||||||
mBusyAnim.setText(progressText);
|
mBusyAnim.setText(progressText);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue