From 3036004daed9065076211a87a22c247af4a9bfea Mon Sep 17 00:00:00 2001 From: WinterSnowfall Date: Fri, 9 Feb 2024 12:10:54 +0200 Subject: [PATCH] [d3d9] Call DestroyCursor on cursor release --- src/d3d9/d3d9_cursor.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/d3d9/d3d9_cursor.h b/src/d3d9/d3d9_cursor.h index 6afe119c..79f2f212 100644 --- a/src/d3d9/d3d9_cursor.h +++ b/src/d3d9/d3d9_cursor.h @@ -13,6 +13,13 @@ namespace dxvk { public: +#ifdef _WIN32 + ~D3D9Cursor() { + if (m_hCursor != nullptr) + ::DestroyCursor(m_hCursor); + } +#endif + void UpdateCursor(int X, int Y); BOOL ShowCursor(BOOL bShow);