浏览代码

Add workaround for cursor visibility on mobiles when using touch input

Ivan Savenko 1 年之前
父节点
当前提交
cbbbe1b23a
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      client/eventsSDL/InputSourceTouch.cpp

+ 3 - 0
client/eventsSDL/InputSourceTouch.cpp

@@ -58,6 +58,9 @@ InputSourceTouch::InputSourceTouch()
 
 void InputSourceTouch::handleEventFingerMotion(const SDL_TouchFingerEvent & tfinger)
 {
+	if (CCS && CCS->curh && settings["video"]["cursor"].String() == "software" && state != TouchState::RELATIVE_MODE)
+		CCS->curh->cursorMove(GH.getCursorPosition().x, GH.getCursorPosition().y);
+
 	switch(state)
 	{
 		case TouchState::RELATIVE_MODE: