Fixed the off-by-one bug in SDL_RecursivelyCalculateShapeTree().
This commit is contained in:
parent
983d7b8fd6
commit
9e01a7bbb1
1 changed files with 3 additions and 3 deletions
|
@ -168,13 +168,13 @@ SDL_ShapeTree* RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surfac
|
|||
next.x = dimensions.x;
|
||||
next.y = dimensions.y;
|
||||
result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
|
||||
next.x = dimensions.w / 2 + 1;
|
||||
next.x = dimensions.w / 2;
|
||||
//Unneeded: next.y = dimensions.y;
|
||||
result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
|
||||
next.x = dimensions.x;
|
||||
next.y = dimensions.h / 2 + 1;
|
||||
next.y = dimensions.h / 2;
|
||||
result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
|
||||
next.x = dimensions.w / 2 + 1;
|
||||
next.x = dimensions.w / 2;
|
||||
//Unneeded: next.y = dimensions.h / 2 + 1;
|
||||
result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue