forked from MoonsideGames/MoonWorks
				
			add PresentMode to WindowCreateInfo
							parent
							
								
									b66e077376
								
							
						
					
					
						commit
						dfddc24d0e
					
				| 
						 | 
				
			
			@ -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!");
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using SDL2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue