mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[common] fix out by one error in rectsIntersect
This commit is contained in:
parent
ad6e3f96e6
commit
bc7cbf1173
@ -203,10 +203,11 @@ void rectsFramebufferToBuffer(FrameDamageRect * rects, int count,
|
||||
|
||||
inline static bool rectIntersects(const FrameDamageRect * r1, const FrameDamageRect * r2)
|
||||
{
|
||||
return r1->x < r2->x + r2->width &&
|
||||
r1->x + r1->width > r2->x &&
|
||||
r1->y < r2->y + r2->height &&
|
||||
r1->y + r1->height > r2->y;
|
||||
return !(
|
||||
r1->x > r2->x + r2->width ||
|
||||
r2->x > r1->x + r1->width ||
|
||||
r1->y > r2->y + r2->height ||
|
||||
r2->y > r1->y + r1->height);
|
||||
}
|
||||
|
||||
int rectsMergeOverlapping(FrameDamageRect * rects, int count)
|
||||
|
Loading…
Reference in New Issue
Block a user