Fix AssetsManagerEx small issues

This commit is contained in:
pandamicro 2015-01-23 12:10:32 +08:00
parent 938b5dc5c6
commit 5e8baa4f39
1 changed files with 2 additions and 2 deletions

View File

@ -823,7 +823,7 @@ void AssetsManagerEx::onProgress(double total, double downloaded, const std::str
{
if (customId == VERSION_ID || customId == MANIFEST_ID)
{
_percent = 100 * (total - downloaded) / total;
_percent = 100 * downloaded / total;
// Notify progression event
dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, customId);
return;
@ -865,7 +865,7 @@ void AssetsManagerEx::onProgress(double total, double downloaded, const std::str
if ((int)currentPercent != (int)_percent) {
_percent = currentPercent;
// Notify progression event
dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, "");
dispatchUpdateEvent(EventAssetsManagerEx::EventCode::UPDATE_PROGRESSION, customId);
}
}
}