diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-16 16:43:33 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-22 22:16:07 +0100 |
commit | 3e49aff35c49190ee9f9f18fcef8db7175d0559a (patch) | |
tree | 9632ce9284acc41d73221daee7266f3795945522 /src/gfx.cpp | |
parent | 6776229047c0f5aac540fc9c367e4abbf5302322 (diff) | |
download | openttd-3e49aff35c49190ee9f9f18fcef8db7175d0559a.tar.xz |
Codechange: Allow video drivers to handle the cursor themselves.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r-- | src/gfx.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp index 9f42a7b53..50f00805e 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1348,6 +1348,9 @@ void ScreenSizeChanged() void UndrawMouseCursor() { + /* Don't undraw mouse cursor if it is handled by the video driver. */ + if (VideoDriver::GetInstance()->UseSystemCursor()) return; + /* Don't undraw the mouse cursor if the screen is not ready */ if (_screen.dst_ptr == nullptr) return; @@ -1361,6 +1364,9 @@ void UndrawMouseCursor() void DrawMouseCursor() { + /* Don't draw mouse cursor if it is handled by the video driver. */ + if (VideoDriver::GetInstance()->UseSystemCursor()) return; + /* Don't draw the mouse cursor if the screen is not ready */ if (_screen.dst_ptr == nullptr) return; |