From 0178e23b738d6e6fadd2a43c5993e5287195e4d4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 30 Sep 2016 18:46:34 +0900 Subject: [PATCH] Ensure we always remain fully visible on any aspect ratio (including very tall ones). --- osu.Game/Graphics/Processing/RatioAdjust.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Processing/RatioAdjust.cs b/osu.Game/Graphics/Processing/RatioAdjust.cs index 2d65038d07..47ad9d36da 100644 --- a/osu.Game/Graphics/Processing/RatioAdjust.cs +++ b/osu.Game/Graphics/Processing/RatioAdjust.cs @@ -1,6 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using osu.Framework.Graphics.Containers; using OpenTK; @@ -13,7 +14,9 @@ namespace osu.Game.Graphics.Processing protected override void Update() { base.Update(); - Scale = new Vector2(Parent.ActualSize.Y / 768f); + Vector2 parent = Parent.ActualSize; + + Scale = new Vector2(Math.Min(parent.Y / 768f, parent.X / 1024f)); Size = new Vector2(1 / Scale.X); } }