From 37b4963329a6fb4dc39d8bbcb9fc8bd785e8a7e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Aug 2013 12:50:22 +0300 Subject: fix mouse cursor drawing in SDL2. --- src/gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') 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) -- cgit v1.2.3-70-g09d2