summaryrefslogtreecommitdiff
path: root/gfx.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-24 00:42:35 +0000
committerDarkvater <darkvater@openttd.org>2006-03-24 00:42:35 +0000
commitea1adebe31673917c957f455d3588b6486142128 (patch)
treef10f7be93e3ce5d8a676824b0bec3535d8c3dfe6 /gfx.c
parent10936e70345e4d462517e35511f0e56b69c444e9 (diff)
downloadopenttd-ea1adebe31673917c957f455d3588b6486142128.tar.xz
(svn r4075) - Feature: Undraw the mouse when it leaves the window and Draw it again when it enters. Added both for WIN32 and SDL. Since Win95 has troubles with TrackMouseEvent(), this function was just simply rewritten which was the easiest. Based on a patch by DmitryKo.
Diffstat (limited to 'gfx.c')
-rw-r--r--gfx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx.c b/gfx.c
index 8c7a94feb..3dab6b132 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1654,6 +1654,9 @@ void DrawMouseCursor(void)
int w;
int h;
+ /* Redraw mouse cursor but only when it's inside the window */
+ if (!_cursor.in_window) return;
+
// Don't draw the mouse cursor if it's already drawn
if (_cursor.visible) {
if (!_cursor.dirty) return;