From 9028a8b1a02d1f73be3d8006f72a8a68acccacdf Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 25 Feb 2022 13:23:31 -0800 Subject: [PATCH] remove Window namespace --- src/Game.cs | 5 ++--- src/Graphics/CommandBuffer.cs | 9 ++++----- src/{Window => }/OSWindow.cs | 8 ++++---- src/{Window => }/ScreenMode.cs | 2 +- src/{Window => }/WindowCreateInfo.cs | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) rename src/{Window => }/OSWindow.cs (94%) rename src/{Window => }/ScreenMode.cs (72%) rename src/{Window => }/WindowCreateInfo.cs (84%) diff --git a/src/Game.cs b/src/Game.cs index 604d4ea..4d9815b 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -3,7 +3,6 @@ using SDL2; using MoonWorks.Audio; using MoonWorks.Graphics; using MoonWorks.Input; -using MoonWorks.Window; using System.Text; using System; using System.Diagnostics; @@ -28,7 +27,7 @@ namespace MoonWorks private int sleepTimeIndex = 0; private TimeSpan worstCaseSleepPrecision = TimeSpan.FromMilliseconds(1); - public OSWindow Window { get; } + public Window Window { get; } public GraphicsDevice GraphicsDevice { get; } public AudioDevice AudioDevice { get; } public Inputs Inputs { get; } @@ -66,7 +65,7 @@ namespace MoonWorks Inputs = new Inputs(); - Window = new OSWindow(windowCreateInfo); + Window = new Window(windowCreateInfo); GraphicsDevice = new GraphicsDevice( Window.Handle, diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index eab8916..f0d3cfb 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.InteropServices; using MoonWorks.Math; -using MoonWorks.Window; using RefreshCS; namespace MoonWorks.Graphics @@ -659,7 +658,7 @@ namespace MoonWorks.Graphics public void QueuePresent( Texture texture, Filter filter, - OSWindow window + Window window ) { var refreshTextureSlice = new Refresh.TextureSlice @@ -696,7 +695,7 @@ namespace MoonWorks.Graphics public void QueuePresent( in TextureSlice textureSlice, Filter filter, - OSWindow window + Window window ) { Refresh.Refresh_QueuePresent( @@ -719,7 +718,7 @@ namespace MoonWorks.Graphics in Texture texture, in Rect destinationRectangle, Filter filter, - OSWindow window + Window window ) { var refreshRect = destinationRectangle.ToRefresh(); @@ -758,7 +757,7 @@ namespace MoonWorks.Graphics in TextureSlice textureSlice, in Rect destinationRectangle, Filter filter, - OSWindow window + Window window ) { var refreshTextureSlice = textureSlice.ToRefreshTextureSlice(); diff --git a/src/Window/OSWindow.cs b/src/OSWindow.cs similarity index 94% rename from src/Window/OSWindow.cs rename to src/OSWindow.cs index c94ba3d..d66d23f 100644 --- a/src/Window/OSWindow.cs +++ b/src/OSWindow.cs @@ -1,9 +1,9 @@ using System; using SDL2; -namespace MoonWorks.Window +namespace MoonWorks { - public class OSWindow : IDisposable + public class Window : IDisposable { internal IntPtr Handle { get; } public ScreenMode ScreenMode { get; } @@ -12,7 +12,7 @@ namespace MoonWorks.Window private bool IsDisposed; - public OSWindow(WindowCreateInfo windowCreateInfo) + public Window(WindowCreateInfo windowCreateInfo) { var windowFlags = SDL.SDL_WindowFlags.SDL_WINDOW_VULKAN; @@ -82,7 +82,7 @@ namespace MoonWorks.Window } } - ~OSWindow() + ~Window() { // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method Dispose(disposing: false); diff --git a/src/Window/ScreenMode.cs b/src/ScreenMode.cs similarity index 72% rename from src/Window/ScreenMode.cs rename to src/ScreenMode.cs index b42aaa0..d9e27ee 100644 --- a/src/Window/ScreenMode.cs +++ b/src/ScreenMode.cs @@ -1,4 +1,4 @@ -namespace MoonWorks.Window +namespace MoonWorks { public enum ScreenMode { diff --git a/src/Window/WindowCreateInfo.cs b/src/WindowCreateInfo.cs similarity index 84% rename from src/Window/WindowCreateInfo.cs rename to src/WindowCreateInfo.cs index 2c88322..1660f47 100644 --- a/src/Window/WindowCreateInfo.cs +++ b/src/WindowCreateInfo.cs @@ -1,4 +1,4 @@ -namespace MoonWorks.Window +namespace MoonWorks { public struct WindowCreateInfo { -- 2.25.1