Browse Source

Fix hardware cursor gets white when switching game

pull/3196/head
obligaron 4 years ago committed by Anders Jenbo
parent
commit
d401376ea4
  1. 5
      Source/hwcursor.hpp
  2. 3
      Source/menu.cpp

5
Source/hwcursor.hpp

@ -51,6 +51,11 @@ public:
return CursorInfo { CursorType::Game, gameSpriteId }; return CursorInfo { CursorType::Game, gameSpriteId };
} }
static CursorInfo UnknownCursor()
{
return CursorInfo { CursorType::Unknown };
}
[[nodiscard]] CursorType type() const [[nodiscard]] CursorType type() const
{ {
return type_; return type_;

3
Source/menu.cpp

@ -8,6 +8,7 @@
#include "DiabloUI/extrasmenu.h" #include "DiabloUI/extrasmenu.h"
#include "DiabloUI/selok.h" #include "DiabloUI/selok.h"
#include "engine/demomode.h" #include "engine/demomode.h"
#include "hwcursor.hpp"
#include "init.h" #include "init.h"
#include "movie.h" #include "movie.h"
#include "options.h" #include "options.h"
@ -193,6 +194,8 @@ void mainmenu_loop()
UiInitialize(); UiInitialize();
FreeItemGFX(); FreeItemGFX();
InitItemGFX(); InitItemGFX();
if (IsHardwareCursor())
SetHardwareCursor(CursorInfo::UnknownCursor());
RefreshMusic(); RefreshMusic();
menu = MAINMENU_NONE; menu = MAINMENU_NONE;
break; break;

Loading…
Cancel
Save