Fix display resolution desynchronizing with auto-position

This commit is contained in:
elasota
2020-11-30 02:59:02 -05:00
parent 0aa36b27a9
commit 553e343abe
13 changed files with 80 additions and 40 deletions

View File

@@ -508,8 +508,7 @@ void MoveDialogToTopOfScreen(Dialog *dial)
Window *window = dial->GetWindow();
PortabilityLayer::Vec2i pos = window->GetPosition();
unsigned int height = 0;
PLDrivers::GetDisplayDriver()->GetDisplayResolution(nullptr, &height);
unsigned int height = PortabilityLayer::WindowManager::GetInstance()->GetDisplayResolution().m_y;
pos.m_y = (height - window->GetDrawSurface()->m_port.GetRect().Height()) / 8;