mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
GUIでプログレスバーが機能していなかったのを修正
This commit is contained in:
parent
1904d6b688
commit
01b97b0cab
@ -575,6 +575,11 @@ private:
|
|||||||
{
|
{
|
||||||
const auto InitEndTime = std::chrono::system_clock::now();
|
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)
|
for (const auto &p : file_paths)
|
||||||
{
|
{
|
||||||
ret = w.waifu2x(p.first, p.second, [this]()
|
ret = w.waifu2x(p.first, p.second, [this]()
|
||||||
@ -582,6 +587,9 @@ private:
|
|||||||
return cancelFlag;
|
return cancelFlag;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
num++;
|
||||||
|
ProgessFunc(maxFile, num);
|
||||||
|
|
||||||
if (ret != Waifu2x::eWaifu2xError_OK)
|
if (ret != Waifu2x::eWaifu2xError_OK)
|
||||||
{
|
{
|
||||||
SendMessage(dh, WM_ON_WAIFU2X_ERROR, (WPARAM)&ret, (LPARAM)&p);
|
SendMessage(dh, WM_ON_WAIFU2X_ERROR, (WPARAM)&ret, (LPARAM)&p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user