From ec1beaa2ee07368368e9bd45fe400eedc57419eb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Aug 2013 14:37:03 +0300 Subject: first part of fixes for compilation with SDL2 --- src/gui/gui.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 2a838069b..8d96cfde3 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -437,8 +437,13 @@ void Gui::draw() int mouseX, mouseY; const uint8_t button = SDL_GetMouseState(&mouseX, &mouseY); +#ifdef USE_SDL2 + if (button & SDL_BUTTON(1) && mMouseCursors && mCustomCursor + && mMouseCursorAlpha > 0.0f) +#else if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f) +#endif { Graphics *g2 = static_cast(mGraphics); const Image *const image = dragDrop.getItemImage(); -- cgit v1.2.3-70-g09d2