GUIでプログレスバーが機能していなかったのを修正

This commit is contained in:
lltcggie 2016-03-06 23:15:53 +09:00
parent 1904d6b688
commit 01b97b0cab

View File

@ -575,6 +575,11 @@ private:
{
const auto InitEndTime = std::chrono::system_clock::now();
const int maxFile = file_paths.size();
int num = 0;
ProgessFunc(maxFile, 0);
for (const auto &p : file_paths)
{
ret = w.waifu2x(p.first, p.second, [this]()
@ -582,6 +587,9 @@ private:
return cancelFlag;
});
num++;
ProgessFunc(maxFile, num);
if (ret != Waifu2x::eWaifu2xError_OK)
{
SendMessage(dh, WM_ON_WAIFU2X_ERROR, (WPARAM)&ret, (LPARAM)&p);