The branch, master has been updated
via 2e5205dcf7039bdb37877634652f342f58ed4bab (commit)
from 9d0bf63505d0ef1cf851b27346bc37c739a16021 (commit)
https://github.com/xbmc/xbmc/commit/2e5205dcf7039bdb37877634652f342f58ed4bab
commit 2e5205dcf7039bdb37877634652f342f58ed4bab
Author: Memphiz <memphis@...>
Date: Mon Aug 1 20:52:06 2011 +0200
[fixed and changed] - fixed inertial scrolling after frame time smoother (GetFrameTime seems to not do its job in determining the absolute start time of inertial scrolling anymore)
- increased threshhold velocity for inertial scrolling to 100 pixles/s
- half the velocity after releasing the finger - makes it feel more like apples implementation
diff --git a/xbmc/InertialScrollingHandler.cpp b/xbmc/InertialScrollingHandler.cpp
index e1274f2..66428ea 100644
--- a/xbmc/InertialScrollingHandler.cpp
+++ b/xbmc/InertialScrollingHandler.cpp
@@ -35,7 +35,7 @@
//the factor for decreasing the deacceleration
#define DEACELLERATION_DECREASE_FACTOR 0.9f
//minimum speed for doing inertial scroll is 50 pixels / s
-#define MINIMUM_SPEED_FOR_INERTIA 50
+#define MINIMUM_SPEED_FOR_INERTIA 100
CInertialScrollingHandler::CInertialScrollingHandler()
: m_bScrolling(false)
@@ -77,8 +77,8 @@ bool CInertialScrollingHandler::CheckForInertialScrolling(const CAction* action)
{
if (action->GetID() == ACTION_GESTURE_END && ( fabs(action->GetAmount(0)) > MINIMUM_SPEED_FOR_INERTIA || fabs(action->GetAmount(1)) > MINIMUM_SPEED_FOR_INERTIA ) )
{
- m_iFlickVelocity.x = action->GetAmount(0);//in pixels per sec
- m_iFlickVelocity.y = action->GetAmount(1);//in pixels per sec
+ m_iFlickVelocity.x = action->GetAmount(0)/2;//in pixels per sec
+ m_iFlickVelocity.y = action->GetAmount(1)/2;//in pixels per sec
m_iLastGesturePoint.x = action->GetAmount(2);//last gesture point x
m_iLastGesturePoint.y = action->GetAmount(3);//last gesture point y
@@ -89,7 +89,7 @@ bool CInertialScrollingHandler::CheckForInertialScrolling(const CAction* action)
m_inertialDeacceleration.y = -1*m_iFlickVelocity.y/TIME_TO_ZERO_SPEED;
//CLog::Log(LOGDEBUG, "initial vel: %f dec: %f", m_iFlickVelocity.y, m_inertialDeacceleration.y);
- m_inertialStartTime = CTimeUtils::GetFrameTime();//start time of inertial scrolling
+ m_inertialStartTime = XbmcThreads::SystemClockMillis();//start time of inertial scrolling
ret = true;
m_bScrolling = true;//activate the inertial scrolling animation
}
-----------------------------------------------------------------------
Summary of changes:
xbmc/InertialScrollingHandler.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
[xbmc/xbmc]
|