Option to disable mouse cursor for touchscreen devices

This commit is contained in:
Sergii Pylypenko
2021-05-11 01:05:10 +03:00
parent 8cccaceda8
commit 4d369cbeb2
6 changed files with 34 additions and 3 deletions

View File

@@ -1399,7 +1399,7 @@ void ScreenSizeChanged()
void UndrawMouseCursor()
{
/* Don't undraw mouse cursor if it is handled by the video driver. */
if (VideoDriver::GetInstance()->UseSystemCursor()) return;
if (VideoDriver::GetInstance()->UseSystemCursor() || !_settings_client.gui.draw_mouse_cursor) return;
/* Don't undraw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == nullptr) return;
@@ -1415,7 +1415,7 @@ void UndrawMouseCursor()
void DrawMouseCursor()
{
/* Don't draw mouse cursor if it is handled by the video driver. */
if (VideoDriver::GetInstance()->UseSystemCursor()) return;
if (VideoDriver::GetInstance()->UseSystemCursor() || !_settings_client.gui.draw_mouse_cursor) return;
/* Don't draw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == nullptr) return;