1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-20 06:12:57 +01:00

Revert DPI accessors

This commit is contained in:
Michael Bernardi
2024-09-27 01:46:46 +10:00
parent 570e1efc8c
commit 09fa68a803
46 changed files with 348 additions and 428 deletions

View File

@@ -1323,11 +1323,9 @@ namespace OpenRCT2::Ui::Windows
if (widget->IsVisible())
{
// Check if widget is outside the draw region
if (w.windowPos.x + widget->left < dpi.ScreenX() + dpi.ScreenWidth()
&& w.windowPos.x + widget->right >= dpi.ScreenX())
if (w.windowPos.x + widget->left < dpi.x + dpi.width && w.windowPos.x + widget->right >= dpi.x)
{
if (w.windowPos.y + widget->top < dpi.ScreenY() + dpi.ScreenHeight()
&& w.windowPos.y + widget->bottom >= dpi.ScreenY())
if (w.windowPos.y + widget->top < dpi.y + dpi.height && w.windowPos.y + widget->bottom >= dpi.y)
{
w.OnDrawWidget(widgetIndex, dpi);
}