From 543f988cc3c5434ffe40d7a32a0c2c2caac674c5 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sat, 26 Mar 2022 16:17:00 +0000 Subject: [PATCH] Fix hardware cursor initialization Hardware cursor should get initialized even for non mouse control types (e.g. `ControlTypes::None`), because by the time the control type gets initialized or changes the cursor is already set up and won't change. Fixes #4233 --- Source/DiabloUI/diabloui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/DiabloUI/diabloui.cpp b/Source/DiabloUI/diabloui.cpp index a8a34c34b..d61e04e0e 100644 --- a/Source/DiabloUI/diabloui.cpp +++ b/Source/DiabloUI/diabloui.cpp @@ -666,7 +666,7 @@ void LoadBackgroundArt(const char *pszFile, int frames) fadeTc = 0; fadeValue = 0; - if (IsHardwareCursorEnabled() && ControlMode == ControlTypes::KeyboardAndMouse && ArtCursor.surface != nullptr && GetCurrentCursorInfo().type() != CursorType::UserInterface) { + if (IsHardwareCursorEnabled() && ArtCursor.surface != nullptr && GetCurrentCursorInfo().type() != CursorType::UserInterface) { #if SDL_VERSION_ATLEAST(2, 0, 0) SDL_SetSurfacePalette(ArtCursor.surface.get(), Palette.get()); SDL_SetColorKey(ArtCursor.surface.get(), 1, 0);