Fix small map screenshots

See: #554
This commit is contained in:
Jonathan G Rennison
2023-06-21 17:11:50 +01:00
parent c339978569
commit cc22351ef4

View File

@@ -1719,9 +1719,8 @@ void SmallMapWindow::ScreenshotCallbackHandler(void *buf, uint y, uint pitch, ui
dpi.left = 0; dpi.left = 0;
dpi.top = y; dpi.top = y;
int32 pos = (((int32)MapMaxX() + 1) * TILE_PIXELS) / 4; this->scroll_x = (dpi.width / 2) - ((16 * ((int)MapSizeY() - (int)MapSizeX())) / this->zoom);
this->scroll_x = pos; this->scroll_y = 0;
this->scroll_y = -pos;
/* make the screenshot */ /* make the screenshot */
this->DrawSmallMap(&dpi, false); this->DrawSmallMap(&dpi, false);