[GDI32] Fix MSVC warning in SetDIBitsToDevice and simplify code. (#7919)

This is a very small revert of PR #5227 to simplify the code and eliminate an MSVC warning.
It was pointed out by Timo Kreuzer as probably not doing what I intended and he was correct.
I added this code in PR #5227 to try and correct some return values from SetDIBitsToDevice.
After testing with this new PR, there was no difference in the regression tests for either
1) gdi32:bitmap or 2) gdi32:SetDIBitsToDevice after deleting the code here and the MSVC warning was fixed.
This commit is contained in:
Doug Lyons 2025-04-24 21:04:36 -05:00 committed by GitHub
parent efbdd483b3
commit 85afe48c3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1019,8 +1019,7 @@ SetDIBitsToDevice(
if (pConvertedInfo->bmiHeader.biHeight < 0)
{
if (pConvertedInfo->bmiHeader.biHeight < -MaxSourceHeight ||
(YDest >= 0 && src_y < -ScanLines))
if (pConvertedInfo->bmiHeader.biHeight < -MaxSourceHeight || YDest >= 0)
{
LinesCopied = ScanLines + src_y;
}