diff options
| author | Michael <[email protected]> | 2017-08-06 23:07:05 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-06 23:07:05 -0400 |
| commit | e07c2f58baa41ac0bc53f338c1e5f88478c0cd1b (patch) | |
| tree | 7f0e9aea60337be25120dd4286c2bd30cb2485e7 /ShiftOS.Frontend/GraphicsSubsystem | |
| parent | 0af9c840293bff1a0ad699fdd9f3a549294feef9 (diff) | |
| download | shiftos_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.cs | 12 |
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(); } |
