mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-04 11:34:22 +01:00
(svn r11583) -Fix [FS#1484]: windows could get completely missing when one resized the window to something very small.
This commit is contained in:
parent
720854ed16
commit
dd68a34e26
@ -2197,8 +2197,11 @@ void RelocateAllWindows(int neww, int newh)
|
|||||||
default:
|
default:
|
||||||
left = w->left;
|
left = w->left;
|
||||||
if (left + (w->width >> 1) >= neww) left = neww - w->width;
|
if (left + (w->width >> 1) >= neww) left = neww - w->width;
|
||||||
|
if (left < 0) left = 0;
|
||||||
|
|
||||||
top = w->top;
|
top = w->top;
|
||||||
if (top + (w->height >> 1) >= newh) top = newh - w->height;
|
if (top + (w->height >> 1) >= newh) top = newh - w->height;
|
||||||
|
if (top < 0) top = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user