mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 21:17:54 +00:00
[common] fix out by one error in rectsIntersect
This commit is contained in:
parent
ad6e3f96e6
commit
bc7cbf1173
1 changed files with 5 additions and 4 deletions
|
@ -203,10 +203,11 @@ void rectsFramebufferToBuffer(FrameDamageRect * rects, int count,
|
||||||
|
|
||||||
inline static bool rectIntersects(const FrameDamageRect * r1, const FrameDamageRect * r2)
|
inline static bool rectIntersects(const FrameDamageRect * r1, const FrameDamageRect * r2)
|
||||||
{
|
{
|
||||||
return r1->x < r2->x + r2->width &&
|
return !(
|
||||||
r1->x + r1->width > r2->x &&
|
r1->x > r2->x + r2->width ||
|
||||||
r1->y < r2->y + r2->height &&
|
r2->x > r1->x + r1->width ||
|
||||||
r1->y + r1->height > r2->y;
|
r1->y > r2->y + r2->height ||
|
||||||
|
r2->y > r1->y + r1->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
int rectsMergeOverlapping(FrameDamageRect * rects, int count)
|
int rectsMergeOverlapping(FrameDamageRect * rects, int count)
|
||||||
|
|
Loading…
Reference in a new issue