From 5e8baa4f3971f958aec3c74c1ed521a97d7f54d0 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Fri, 23 Jan 2015 12:10:32 +0800 Subject: [PATCH] Fix AssetsManagerEx small issues --- extensions/assets-manager/AssetsManagerEx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/assets-manager/AssetsManagerEx.cpp b/extensions/assets-manager/AssetsManagerEx.cpp index 319a9c2de0..1b6d7a660f 100644 --- a/extensions/assets-manager/AssetsManagerEx.cpp +++ b/extensions/assets-manager/AssetsManagerEx.cpp @@ -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); } } }