From 2d0d7ccc884b9db5798be397df7dd9249c65c072 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 8 Aug 2022 07:49:37 +0100 Subject: [PATCH] Reinitialize hardware cursor on window size change --- Source/init.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/init.cpp b/Source/init.cpp index a25d55bf3..8023ceeb7 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -15,6 +15,7 @@ #include "DiabloUI/diabloui.h" #include "engine/assets.hpp" #include "engine/dx.h" +#include "hwcursor.hpp" #include "miniwin/misc_msg.h" #include "mpq/mpq_reader.hpp" #include "options.h" @@ -245,6 +246,9 @@ void MainWndProc(const SDL_Event &event) case SDL_WINDOWEVENT_EXPOSED: force_redraw = 255; break; + case SDL_WINDOWEVENT_SIZE_CHANGED: + ReinitializeHardwareCursor(); + break; case SDL_WINDOWEVENT_LEAVE: sgbMouseDown = CLICK_NONE; LastMouseButtonAction = MouseActionType::None;