diff --git a/src/Game.cs b/src/Game.cs index 21026eb..0b9ea9f 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; @@ -67,7 +67,7 @@ namespace MoonWorks debugMode ); - MainWindow = new Window(windowCreateInfo, GraphicsDevice.WindowFlags); + MainWindow = new Window(windowCreateInfo, GraphicsDevice.WindowFlags | SDL.SDL_WindowFlags.SDL_WINDOW_HIDDEN); if (!GraphicsDevice.ClaimWindow(MainWindow, windowCreateInfo.PresentMode)) { @@ -79,6 +79,8 @@ namespace MoonWorks public void Run() { + MainWindow.Show(); + while (!quit) { Tick(); diff --git a/src/Window.cs b/src/Window.cs index a890650..a78eb8c 100644 --- a/src/Window.cs +++ b/src/Window.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using SDL2; @@ -92,6 +92,11 @@ namespace MoonWorks return idLookup.ContainsKey(windowID) ? idLookup[windowID] : null; } + internal void Show() + { + SDL.SDL_ShowWindow(Handle); + } + internal void SizeChanged(uint width, uint height) { Width = width;