mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +08:00
Avoid potential cropping error on very tall backgrounds
This commit is contained in:
parent
49c77a64ef
commit
2823a62b5f
@ -73,6 +73,8 @@ namespace osu.Game.Beatmaps
|
||||
// We need to include enough height to make this work for all ratio panels are displayed at.
|
||||
int usableHeight = (int)Math.Ceiling(size.Width * 1 / minimum_display_ratio);
|
||||
|
||||
usableHeight = Math.Min(size.Height, usableHeight);
|
||||
|
||||
// Crop the centre region of the background for now.
|
||||
Rectangle cropRectangle = new Rectangle(
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user