mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:20:56 +00:00
winemac: Make cgrect_from_rect() preserve origin of empty rectangles.
This commit is contained in:
parent
21e0f739be
commit
87dd13150a
|
@ -44,9 +44,7 @@
|
|||
|
||||
static inline CGRect cgrect_from_rect(RECT rect)
|
||||
{
|
||||
if (rect.left >= rect.right || rect.top >= rect.bottom)
|
||||
return CGRectNull;
|
||||
return CGRectMake(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
|
||||
return CGRectMake(rect.left, rect.top, max(0, rect.right - rect.left), max(0, rect.bottom - rect.top));
|
||||
}
|
||||
|
||||
static inline RECT rect_from_cgrect(CGRect cgrect)
|
||||
|
|
Loading…
Reference in a new issue