1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Fix beatmap panel background looking different than usual

This commit is contained in:
Salman Ahmed 2023-06-09 09:16:05 +03:00
parent 3c51b5a53a
commit df874b9ae8

View File

@ -66,7 +66,10 @@ namespace osu.Game.Beatmaps
textureUpload.Dispose();
Size size = image.Size();
int usableWidth = Math.Min(max_width, size.Width);
float aspectRatio = (float)size.Width / size.Height;
int usableWidth = Math.Min((int)(max_width * aspectRatio), size.Width);
int usableHeight = Math.Min(max_height, size.Height);
// Crop the centre region of the background for now.