Fix hardware cursor gets white when switching game
This commit is contained in:
parent
f51768a567
commit
d401376ea4
2 changed files with 8 additions and 0 deletions
|
|
@ -51,6 +51,11 @@ public:
|
|||
return CursorInfo { CursorType::Game, gameSpriteId };
|
||||
}
|
||||
|
||||
static CursorInfo UnknownCursor()
|
||||
{
|
||||
return CursorInfo { CursorType::Unknown };
|
||||
}
|
||||
|
||||
[[nodiscard]] CursorType type() const
|
||||
{
|
||||
return type_;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "DiabloUI/extrasmenu.h"
|
||||
#include "DiabloUI/selok.h"
|
||||
#include "engine/demomode.h"
|
||||
#include "hwcursor.hpp"
|
||||
#include "init.h"
|
||||
#include "movie.h"
|
||||
#include "options.h"
|
||||
|
|
@ -193,6 +194,8 @@ void mainmenu_loop()
|
|||
UiInitialize();
|
||||
FreeItemGFX();
|
||||
InitItemGFX();
|
||||
if (IsHardwareCursor())
|
||||
SetHardwareCursor(CursorInfo::UnknownCursor());
|
||||
RefreshMusic();
|
||||
menu = MAINMENU_NONE;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue