13 Oct
2024
13 Oct
'24
4:30 p.m.
Piotr Caban (@piotr) commented about dlls/win32u/dibdrv/graphics.c:
{rect->right, rect->bottom}, {rect->right, rect->top} }; - unsigned int width, height; + unsigned int width, height, points;
lp_to_dp( dc, pts, 4 ); width = max( abs( pts[2].x - pts[0].x ), abs( pts[3].x - pts[1].x )); height = max( abs( pts[2].y - pts[0].y ), abs( pts[3].y - pts[1].y )); - return (width + height) * 3; + points = (width * height) * 3; + return (points % 4) == 0 ? points : points + (4 - ( points % 4 ));
`(points + 3) & ~3` is probably easier to read. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6662#note_84866