mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-16 16:16:44 +00:00
Fix normalization of touch coordinates
This commit is contained in:
parent
f8bfbb5b7c
commit
2427d4cef5
@ -194,8 +194,8 @@ bool MoonlightInstance::TryHandleNativeTouchEvent(const pp::InputEvent& event) {
|
|||||||
pp::TouchPoint touchPoint = touchEvent.GetTouchByIndex(PP_TOUCHLIST_TYPE_CHANGEDTOUCHES, i);
|
pp::TouchPoint touchPoint = touchEvent.GetTouchByIndex(PP_TOUCHLIST_TYPE_CHANGEDTOUCHES, i);
|
||||||
pp::FloatPoint touchPos = touchPoint.position();
|
pp::FloatPoint touchPos = touchPoint.position();
|
||||||
LiSendTouchEvent(eventType, touchPoint.id(),
|
LiSendTouchEvent(eventType, touchPoint.id(),
|
||||||
MIN(MAX(touchPos.x(), 0), m_PluginRect.width()),
|
MIN(MAX(touchPos.x(), 0), m_PluginRect.width()) / m_PluginRect.width(),
|
||||||
MIN(MAX(touchPos.y(), 0), m_PluginRect.height()),
|
MIN(MAX(touchPos.y(), 0), m_PluginRect.height()) / m_PluginRect.height(),
|
||||||
touchPoint.pressure(),
|
touchPoint.pressure(),
|
||||||
0.0f, 0.0f,
|
0.0f, 0.0f,
|
||||||
touchPoint.rotation_angle());
|
touchPoint.rotation_angle());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user