Oops, forgot this one in the last commit.

This commit is contained in:
Stephen Anthony 2017-12-18 15:19:19 -03:30
parent dd5a46880e
commit 9d93472298
1 changed files with 2 additions and 3 deletions

View File

@ -106,9 +106,8 @@ void Dialog::center()
if(_surface)
{
const GUI::Size& screen = instance().frameBuffer().screenSize();
uInt32 x = (screen.w - getWidth()) >> 1;
uInt32 y = (screen.h - getHeight()) >> 1;
_surface->setDstPos(x, y);
const GUI::Rect& dst = _surface->dstRect();
_surface->setDstPos((screen.w - dst.width()) >> 1, (screen.h - dst.height()) >> 1);
}
}