Port dirty block handling from JGRPP

This commit is contained in:
dP
2023-03-29 21:47:07 +04:00
parent ef7d1c5f04
commit ef9f6aa7f3
22 changed files with 837 additions and 193 deletions

View File

@@ -133,6 +133,7 @@ bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
if (vp != nullptr) { // the vp can be null when how == ZOOM_NONE
vp->virtual_left = w->viewport->scrollpos_x;
vp->virtual_top = w->viewport->scrollpos_y;
UpdateViewportSizeZoom(vp);
}
/* Update the windows that have zoom-buttons to perhaps disable their buttons */
w->InvalidateData();
@@ -176,6 +177,7 @@ void FixTitleGameZoom(int zoom_adjust)
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
UpdateViewportSizeZoom(vp);
}
static const struct NWidgetPart _nested_main_window_widgets[] = {
@@ -599,5 +601,4 @@ void GameSizeChanged()
_cur_resolution.height = _screen.height;
ScreenSizeChanged();
RelocateAllWindows(_screen.width, _screen.height);
MarkWholeScreenDirty();
}