summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 12:50:22 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:16 +0300
commit37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2 (patch)
treef4e2f0ec38cb6328cdfd0a19946e04698128618d /src
parent640fc369b474e395975e82471a1e4be291d23407 (diff)
downloadmanaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.gz
manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.bz2
manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.xz
manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.zip
fix mouse cursor drawing in SDL2.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 8d96cfde3..ba7a0de06 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -438,8 +438,8 @@ void Gui::draw()
const uint8_t button = SDL_GetMouseState(&mouseX, &mouseY);
#ifdef USE_SDL2
- if (button & SDL_BUTTON(1) && mMouseCursors && mCustomCursor
- && mMouseCursorAlpha > 0.0f)
+ // +++ need check also is window have mouse focus SDL_GetMouseFocus
+ if (mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f)
#else
if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1))
&& mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f)