diff --git a/JGE/include/corewrapper.h b/JGE/include/corewrapper.h index 3ea9dc060..a81c09f96 100644 --- a/JGE/include/corewrapper.h +++ b/JGE/include/corewrapper.h @@ -89,6 +89,9 @@ private: int64_t m_lastTickCount; std::queue m_buttonQueue; bool m_active; + float mMouseDownX; + float mMouseDownY; + int mLastFingerDownTime; }; diff --git a/JGE/src/corewrapper.cpp b/JGE/src/corewrapper.cpp index cc35ab320..030da581a 100644 --- a/JGE/src/corewrapper.cpp +++ b/JGE/src/corewrapper.cpp @@ -221,15 +221,15 @@ bool WagicCore::onPointerReleased(WagicCore::PointerId pointer, int x, int y) #if (defined Q_WS_MAEMO_5) || (defined MEEGO_EDITION_HARMATTAN) || (defined ANDROID) || (defined IOS) if(JGEGetTime() - mLastFingerDownTime <= kTapEventTimeout ) { - if(abs(mMouseDownX - lastPos.x()) < kHitzonePliancy && - abs(mMouseDownY - lastPos.y()) < kHitzonePliancy) + if(abs(mMouseDownX - x) < kHitzonePliancy && + abs(mMouseDownY - y) < kHitzonePliancy) { m_engine->HoldKey_NoRepeat(JGE_BTN_OK); } } else if (JGEGetTime() - mLastFingerDownTime >= kSwipeEventMinDuration) { // Let's swipe - m_engine->Scroll(lastPos.x()-mMouseDownX, lastPos.y()-mMouseDownY); + m_engine->Scroll(x-mMouseDownX, y-mMouseDownY); } #else m_engine->ReleaseKey(JGE_BTN_OK);