From 8e627c9b18a7026570ec9589ba759d07cc5acceb Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 24 Feb 2021 13:03:39 -0800 Subject: [PATCH] add window resize function --- src/Window/OSWindow.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Window/OSWindow.cs b/src/Window/OSWindow.cs index ecdecb5..4db8065 100644 --- a/src/Window/OSWindow.cs +++ b/src/Window/OSWindow.cs @@ -48,5 +48,16 @@ namespace MoonWorks.Window SDL.SDL_SetWindowFullscreen(Handle, (uint) windowFlag); } + + /// + /// Resizes the window. + /// Note that you are responsible for recreating any graphics resources that need to change as a result of the size change. + /// + /// + /// + public void SetWindowSize(uint width, uint height) + { + SDL.SDL_SetWindowSize(Handle, (int)width, (int)height); + } } }