mirror of
https://github.com/godotengine/godot.git
synced 2025-01-24 02:40:53 +00:00
Update ResourceLoaderText::load to not update progress if resources are 0
Include check in other progress update statement Update additional progress update statement
This commit is contained in:
parent
ac5619f521
commit
94b09da9a1
@ -572,7 +572,7 @@ Error ResourceLoaderText::load() {
|
||||
}
|
||||
}
|
||||
|
||||
if (progress) {
|
||||
if (progress && resources_total > 0) {
|
||||
*progress = resource_current / float(resources_total);
|
||||
}
|
||||
}
|
||||
@ -640,7 +640,7 @@ Error ResourceLoaderText::load() {
|
||||
return error;
|
||||
} else {
|
||||
error = OK;
|
||||
if (progress) {
|
||||
if (progress && resources_total > 0) {
|
||||
*progress = resource_current / float(resources_total);
|
||||
}
|
||||
|
||||
@ -674,7 +674,7 @@ Error ResourceLoaderText::load() {
|
||||
|
||||
resource_current++;
|
||||
|
||||
if (progress) {
|
||||
if (progress && resources_total > 0) {
|
||||
*progress = resource_current / float(resources_total);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user