From 6f505f34a985b493ab16957ed49f036699ba9b11 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 20 Jul 2024 00:45:16 +0200 Subject: [PATCH] Unload resources before destroying device. --- Nerfed.Runtime/Graphics/GraphicsDevice.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Nerfed.Runtime/Graphics/GraphicsDevice.cs b/Nerfed.Runtime/Graphics/GraphicsDevice.cs index ded7baf..f274e00 100644 --- a/Nerfed.Runtime/Graphics/GraphicsDevice.cs +++ b/Nerfed.Runtime/Graphics/GraphicsDevice.cs @@ -1,6 +1,6 @@ -using System.Runtime.InteropServices; -using Nerfed.Runtime.Video; +using Nerfed.Runtime.Video; using RefreshCS; +using System.Runtime.InteropServices; namespace Nerfed.Runtime.Graphics; @@ -372,6 +372,11 @@ private void Dispose(bool disposing) resources.Clear(); } + + ResourceManager.Unload(FullscreenVertexShader); + ResourceManager.Unload(TextFragmentShader); + ResourceManager.Unload(TextVertexShader); + ResourceManager.Unload(VideoFragmentShader); } Refresh.Refresh_DestroyDevice(Handle);