From a80822a8b3751fd5538561e5ec0b56ea15620477 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 6afe119c3de..79f2f2127bf 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);