diff --git a/Source/diablo.cpp b/Source/diablo.cpp index c5b230480..0ae6104af 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -4389,17 +4389,17 @@ void InitPadmapActions() options.Padmapper.CommitActions(); } -void SetCursorPos(Point position) -{ - if (ControlDevice != ControlTypes::KeyboardAndMouse) { - MousePosition = position; - return; - } - - LogicalToOutput(&position.x, &position.y); - if (!demo::IsRunning()) - SDL_WarpMouseInWindow(ghMainWnd, position.x, position.y); -} +void SetCursorPos(Point position) +{ + MousePosition = position; + if (ControlDevice != ControlTypes::KeyboardAndMouse) { + return; + } + + LogicalToOutput(&position.x, &position.y); + if (!demo::IsRunning()) + SDL_WarpMouseInWindow(ghMainWnd, position.x, position.y); +} void FreeGameMem() { diff --git a/Source/panels/spell_list.cpp b/Source/panels/spell_list.cpp index cb50b0341..cf3c18b00 100644 --- a/Source/panels/spell_list.cpp +++ b/Source/panels/spell_list.cpp @@ -15,11 +15,12 @@ #include "options.h" #include "panels/spell_icons.hpp" #include "player.h" -#include "spells.h" -#include "utils/algorithm/container.hpp" -#include "utils/language.h" -#include "utils/str_cat.hpp" -#include "utils/utf8.hpp" +#include "spells.h" +#include "utils/algorithm/container.hpp" +#include "utils/language.h" +#include "utils/screen_reader.hpp" +#include "utils/str_cat.hpp" +#include "utils/utf8.hpp" #define SPLROWICONLS 10 @@ -321,15 +322,16 @@ bool IsValidSpeedSpell(size_t slot) return (spells & GetSpellBitmask(spellId)) != 0; } -void ToggleSpell(size_t slot) -{ - if (IsValidSpeedSpell(slot)) { - Player &myPlayer = *MyPlayer; - myPlayer._pRSpell = myPlayer._pSplHotKey[slot]; - myPlayer._pRSplType = myPlayer._pSplTHotKey[slot]; - RedrawEverything(); - } -} +void ToggleSpell(size_t slot) +{ + if (IsValidSpeedSpell(slot)) { + Player &myPlayer = *MyPlayer; + myPlayer._pRSpell = myPlayer._pSplHotKey[slot]; + myPlayer._pRSplType = myPlayer._pSplTHotKey[slot]; + RedrawEverything(); + SpeakText(pgettext("spell", GetSpellData(myPlayer._pRSpell).sNameText), /*force=*/true); + } +} void DoSpeedBook() {