@@ -132,6 +132,8 @@ public:
return m_touchPointerPosWin[p];
}
+ Bool hasTouchDevice() const;
+
protected:
NativeWindow* m_nativeWindow = nullptr;
HeapAllocator<U8> m_alloc;
@@ -85,6 +85,11 @@ void Input::hideCursor(Bool hide)
// do nothing
+Bool Input::hasTouchDevice() const
+{
+ return true;
+}
Error InputAndroid::init()
{
ANKI_ASSERT(m_nativeWindow);
@@ -54,4 +54,9 @@ void Input::hideCursor(Bool hide)
// Nothing
+ return false;
} // end namespace anki
@@ -97,6 +97,11 @@ void Input::hideCursor(Bool hide)
SDL_ShowCursor(!hide);
Error InputSdl::init()
@@ -130,7 +130,7 @@ Error SampleApp::userMainLoop(Bool& quit, Second elapsedTime)
mousePosOn1stClick = in.getMousePosition();
- if(in.getMouseButton(MouseButton::RIGHT))
+ if(in.getMouseButton(MouseButton::RIGHT) || in.hasTouchDevice())
in.hideCursor(true);