diff --git a/src/Game.cs b/src/Game.cs index 2a37582d..21026eb5 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using SDL2; using MoonWorks.Audio; using MoonWorks.Graphics; @@ -37,7 +37,6 @@ namespace MoonWorks public Game( WindowCreateInfo windowCreateInfo, - PresentMode presentMode, FrameLimiterSettings frameLimiterSettings, int targetTimestep = 60, bool debugMode = false @@ -70,7 +69,7 @@ namespace MoonWorks MainWindow = new Window(windowCreateInfo, GraphicsDevice.WindowFlags); - if (!GraphicsDevice.ClaimWindow(MainWindow, presentMode)) + if (!GraphicsDevice.ClaimWindow(MainWindow, windowCreateInfo.PresentMode)) { throw new System.SystemException("Could not claim window!"); } diff --git a/src/Graphics/RefreshEnums.cs b/src/Graphics/RefreshEnums.cs index 1362a907..1c859c40 100644 --- a/src/Graphics/RefreshEnums.cs +++ b/src/Graphics/RefreshEnums.cs @@ -1,9 +1,6 @@ using System; -/* Recreate all the enums in here so we don't need to explicitly - * reference the RefreshCS namespace when using MoonWorks.Graphics - */ -namespace MoonWorks.Graphics +namespace MoonWorks { public enum PresentMode { @@ -12,7 +9,13 @@ namespace MoonWorks.Graphics FIFO, FIFORelaxed } +} +/* Recreate all the enums in here so we don't need to explicitly + * reference the RefreshCS namespace when using MoonWorks.Graphics + */ +namespace MoonWorks.Graphics +{ public enum PrimitiveType { PointList, diff --git a/src/Window.cs b/src/Window.cs index e1f1cdbf..a8906506 100644 --- a/src/Window.cs +++ b/src/Window.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using SDL2; diff --git a/src/WindowCreateInfo.cs b/src/WindowCreateInfo.cs index a4aed7e4..e930593e 100644 --- a/src/WindowCreateInfo.cs +++ b/src/WindowCreateInfo.cs @@ -6,6 +6,7 @@ public uint WindowWidth; public uint WindowHeight; public ScreenMode ScreenMode; + public PresentMode PresentMode; public bool SystemResizable; public bool StartMaximized; @@ -14,6 +15,7 @@ uint windowWidth, uint windowHeight, ScreenMode screenMode, + PresentMode presentMode, bool systemResizable = false, bool startMaximized = false ) { @@ -21,6 +23,7 @@ WindowWidth = windowWidth; WindowHeight = windowHeight; ScreenMode = screenMode; + PresentMode = presentMode; SystemResizable = systemResizable; StartMaximized = startMaximized; }