Skip to content

Commit

Permalink
Adjust abort timing
Browse files Browse the repository at this point in the history
  • Loading branch information
sincos2854 committed May 12, 2024
1 parent 97f0db9 commit b1d9d85
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ifswp2cm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ int GetPictureEx(LPCWSTR file_name, const LPBYTE data, size_t size, HANDLE* pHBI
memcpy(bitmap + stride * (height - i - 1), line.get(), stride);
}

if (lpPrgressCallback)
{
if (lpPrgressCallback(100, 100, lData))
{
return SPI_ABORT;
}
}

LocalUnlock(h_bitmap.get());
LocalUnlock(h_bitmap_info.get());

Expand All @@ -208,13 +216,5 @@ int GetPictureEx(LPCWSTR file_name, const LPBYTE data, size_t size, HANDLE* pHBI
h_bitmap_info.release();
h_bitmap.release();

if (lpPrgressCallback)
{
if (lpPrgressCallback(100, 100, lData))
{
return SPI_ABORT;
}
}

return SPI_ALL_RIGHT;
}

0 comments on commit b1d9d85

Please sign in to comment.