aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/GraphicsSubsystem
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-08-06 23:07:05 -0400
committerMichael <[email protected]>2017-08-06 23:07:05 -0400
commite07c2f58baa41ac0bc53f338c1e5f88478c0cd1b (patch)
tree7f0e9aea60337be25120dd4286c2bd30cb2485e7 /ShiftOS.Frontend/GraphicsSubsystem
parent0af9c840293bff1a0ad699fdd9f3a549294feef9 (diff)
downloadshiftos_thereturn-e07c2f58baa41ac0bc53f338c1e5f88478c0cd1b.tar.gz
shiftos_thereturn-e07c2f58baa41ac0bc53f338c1e5f88478c0cd1b.tar.bz2
shiftos_thereturn-e07c2f58baa41ac0bc53f338c1e5f88478c0cd1b.zip
Scale the screen so it doesn't look shit in 1440p
Diffstat (limited to 'ShiftOS.Frontend/GraphicsSubsystem')
-rw-r--r--ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs12
1 files changed, 10 insertions, 2 deletions
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();
}