Fixed corewrapper Android files.

This commit is contained in:
xawotihs
2013-11-26 23:03:30 +01:00
parent 978171d775
commit 94deb63d22
2 changed files with 6 additions and 3 deletions

View File

@@ -89,6 +89,9 @@ private:
int64_t m_lastTickCount;
std::queue<JButton> m_buttonQueue;
bool m_active;
float mMouseDownX;
float mMouseDownY;
int mLastFingerDownTime;
};

View File

@@ -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);