Browse Source

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
pull/4236/head
Gleb Mazovetskiy 4 years ago
parent
commit
543f988cc3
  1. 2
      Source/DiabloUI/diabloui.cpp

2
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);

Loading…
Cancel
Save