summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2011-11-26 13:48:06 +0000
committerpeter1138 <peter1138@openttd.org>2011-11-26 13:48:06 +0000
commit349da42ce37f14b438ed477d7e091d9284c3f085 (patch)
treeaa328cf8f9992ccf00bbc1553dd3758e8673630a /src
parentcd6249dfc5f6b183fa249f223503732d2d4a52c6 (diff)
downloadopenttd-349da42ce37f14b438ed477d7e091d9284c3f085.tar.xz
(svn r23333) -Fix [FS#4854]: Make zoomed in screenshot use the selected maximum zoom.
Diffstat (limited to 'src')
-rw-r--r--src/screenshot.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 5cf2ebf56..474c321ee 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -736,15 +736,15 @@ static bool MakeZoomedInScreenshot()
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
ViewPort vp;
- vp.zoom = ZOOM_LVL_NORMAL;
+ vp.zoom = _settings_client.gui.zoom_min;
vp.left = w->viewport->left;
vp.top = w->viewport->top;
vp.virtual_left = w->viewport->virtual_left;
vp.virtual_top = w->viewport->virtual_top;
vp.virtual_width = w->viewport->virtual_width;
- vp.width = vp.virtual_width;
+ vp.width = UnScaleByZoom(vp.virtual_width, vp.zoom);
vp.virtual_height = w->viewport->virtual_height;
- vp.height = vp.virtual_height;
+ vp.height = UnScaleByZoom(vp.virtual_height, vp.zoom);
const ScreenshotFormat *sf = _screenshot_formats + _cur_screenshot_format;
return sf->proc(MakeScreenshotName(SCREENSHOT_NAME, sf->extension), LargeWorldCallback, &vp, vp.width, vp.height,