diff options
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 5ff02aa8..7da5520c 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -130,10 +130,14 @@ void Graphics::drawImageRect( void Graphics::updateScreen() { - // Draw mouse before flipping int mouseX, mouseY; - SDL_GetMouseState(&mouseX, &mouseY); - mouseCursor->draw(screen, mouseX - 5, mouseY - 2); + Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); + + if (SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) + { + // Draw mouse before flipping + mouseCursor->draw(screen, mouseX - 5, mouseY - 2); + } if (useOpenGL) { glFlush(); |