From e07c2f58baa41ac0bc53f338c1e5f88478c0cd1b Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 6 Aug 2017 23:07:05 -0400 Subject: Scale the screen so it doesn't look shit in 1440p --- ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ShiftOS.Frontend/GraphicsSubsystem') diff --git a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs index dc47e93..085054b 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs @@ -42,6 +42,14 @@ namespace ShiftOS.Frontend.GraphicsSubsystem } } + public static System.Drawing.Size ScreenSize + { + get + { + return new System.Drawing.Size(_game.graphicsDevice.PreferredBackBufferWidth, _game.graphicsDevice.PreferredBackBufferHeight); + } + } + public static void BringToFront(GUI.Control ctrl) { topLevels.Remove(ctrl); @@ -146,8 +154,8 @@ namespace ShiftOS.Frontend.GraphicsSubsystem graphics.Clear(Color.Transparent); var gfxContext = new GraphicsContext(graphics, batch, 0, 0, _target.Width, _target.Height); ctrl.Paint(gfxContext); - - graphics.SetRenderTarget(null); + + graphics.SetRenderTarget(_game.GameRenderTarget); TextureCaches[hc] = _target; batch.End(); } -- cgit v1.2.3