mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26314) -Fix [FS#5899]: The giant-screenshot confirmation window only triggered for rediculously big screenshots, for ludicrously big ones.
This commit is contained in:
parent
9f6b8aea49
commit
167f232623
|
@ -1064,14 +1064,14 @@ static void MenuClickLargeWorldScreenshot(ScreenshotType t)
|
||||||
{
|
{
|
||||||
ViewPort vp;
|
ViewPort vp;
|
||||||
SetupScreenshotViewport(t, &vp);
|
SetupScreenshotViewport(t, &vp);
|
||||||
if (vp.width * vp.height > 8192 * 8192) {
|
if ((uint64)vp.width * (uint64)vp.height > 8192 * 8192) {
|
||||||
/* Ask for confirmation */
|
/* Ask for confirmation */
|
||||||
SetDParam(0, vp.width);
|
SetDParam(0, vp.width);
|
||||||
SetDParam(1, vp.height);
|
SetDParam(1, vp.height);
|
||||||
_confirmed_screenshot_type = t;
|
_confirmed_screenshot_type = t;
|
||||||
ShowQuery(STR_WARNING_SCREENSHOT_SIZE_CAPTION, STR_WARNING_SCREENSHOT_SIZE_MESSAGE, NULL, ScreenshotConfirmCallback);
|
ShowQuery(STR_WARNING_SCREENSHOT_SIZE_CAPTION, STR_WARNING_SCREENSHOT_SIZE_MESSAGE, NULL, ScreenshotConfirmCallback);
|
||||||
} else {
|
} else {
|
||||||
/* Less than 4M pixels, just do it */
|
/* Less than 64M pixels, just do it */
|
||||||
MakeScreenshot(t, NULL);
|
MakeScreenshot(t, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue