diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 12:50:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | 37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2 (patch) | |
tree | f4e2f0ec38cb6328cdfd0a19946e04698128618d /src/gui | |
parent | 640fc369b474e395975e82471a1e4be291d23407 (diff) | |
download | manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.gz manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.bz2 manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.tar.xz manaverse-37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2.zip |
fix mouse cursor drawing in SDL2.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 4 |
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) |