mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r8133) -Fix [FS#535]: "out of sprite memory" warning messages due to incorrect assumption of requested memory for sprites (smatz)
This commit is contained in:
parent
c6bfa82874
commit
5f06f6796d
@ -1293,7 +1293,7 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
|
||||
// If we do, the sprite memory will overflow.
|
||||
static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom)
|
||||
{
|
||||
if (((bottom - top) * (right - left) << vp->zoom) > 180000) {
|
||||
if (((bottom - top) * (right - left) << (2 * vp->zoom)) > 180000) {
|
||||
if ((bottom - top) > (right - left)) {
|
||||
int t = (top + bottom) >> 1;
|
||||
ViewportDrawChk(vp, left, top, right, t);
|
||||
|
Loading…
Reference in New Issue
Block a user