gui.c: Remove unneeded condition

Even if neither hcentered or vcentered are used, GUI element position
must be determined by that of its parents.
This commit is contained in:
Xavier Del Campo Romero 2022-09-23 04:18:17 +02:00
parent 68ccd085fc
commit 9e308d97d9
1 changed files with 1 additions and 3 deletions

View File

@ -47,9 +47,7 @@ void gui_coords(const struct gui_common *const g, short *const x,
{ {
short px = p->x + p->xoff, py = p->y + p->yoff; short px = p->x + p->xoff, py = p->y + p->yoff;
if (p->hcentered || p->vcentered) gui_coords(p, &px, &py);
gui_coords(p, &px, &py);
*x += px; *x += px;
*y += py; *y += py;
} }