diff options
author | 2013-04-09 14:15:47 +0900 | |
---|---|---|
committer | 2013-04-09 17:51:53 +0900 | |
commit | a1d84bcf8ffd031c135b6f3f8c94b6732071849b (patch) | |
tree | e51413a91515eb481692f52b8f9001c0e50609f5 /native/jni/src/proximity_info.cpp | |
parent | 1f70a4d68136a74e89cb9ff0581141eae9d21516 (diff) | |
download | latinime-a1d84bcf8ffd031c135b6f3f8c94b6732071849b.tar.gz latinime-a1d84bcf8ffd031c135b6f3f8c94b6732071849b.tar.xz latinime-a1d84bcf8ffd031c135b6f3f8c94b6732071849b.zip |
Fix touch coordinate calibration
TRT: I3b5f3ed07eabc59306a17
Bug: 8505668
Change-Id: I574d25a4e9886c521f013f9a8ffc09cc145fc0fc
Diffstat (limited to 'native/jni/src/proximity_info.cpp')
-rw-r--r-- | native/jni/src/proximity_info.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/native/jni/src/proximity_info.cpp b/native/jni/src/proximity_info.cpp index 74b5e0131..50f38e82e 100644 --- a/native/jni/src/proximity_info.cpp +++ b/native/jni/src/proximity_info.cpp @@ -129,7 +129,7 @@ bool ProximityInfo::hasSpaceProximity(const int x, const int y) const { } float ProximityInfo::getNormalizedSquaredDistanceFromCenterFloatG( - const int keyId, const int x, const int y) const { + const int keyId, const int x, const int y, const float verticalScale) const { const bool correctTouchPosition = hasTouchPositionCorrectionData(); const float centerX = static_cast<float>(correctTouchPosition ? getSweetSpotCenterXAt(keyId) : getKeyCenterXOfKeyIdG(keyId)); @@ -138,7 +138,7 @@ float ProximityInfo::getNormalizedSquaredDistanceFromCenterFloatG( if (correctTouchPosition) { const float sweetSpotCenterY = static_cast<float>(getSweetSpotCenterYAt(keyId)); const float gapY = sweetSpotCenterY - visualKeyCenterY; - centerY = visualKeyCenterY + gapY * ProximityInfoParams::VERTICAL_SWEET_SPOT_SCALE_G; + centerY = visualKeyCenterY + gapY * verticalScale; } else { centerY = visualKeyCenterY; } |