mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-02 21:58:42 +00:00
fix: steer wheel delay bug
This commit is contained in:
parent
0a211854e9
commit
29c03c2285
1 changed files with 2 additions and 6 deletions
|
@ -286,7 +286,6 @@ void InputConvertGame::onSteerWheelTimer() {
|
||||||
if(m_ctrlSteerWheel.delayData.queuePos.empty() && m_ctrlSteerWheel.delayData.pressedNum == 0) {
|
if(m_ctrlSteerWheel.delayData.queuePos.empty() && m_ctrlSteerWheel.delayData.pressedNum == 0) {
|
||||||
sendTouchUpEvent(id, m_ctrlSteerWheel.delayData.currentPos);
|
sendTouchUpEvent(id, m_ctrlSteerWheel.delayData.currentPos);
|
||||||
detachTouchID(m_ctrlSteerWheel.touchKey);
|
detachTouchID(m_ctrlSteerWheel.touchKey);
|
||||||
qDebug() << "***************** detach:" << id;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,10 +338,8 @@ void InputConvertGame::processSteerWheel(const KeyMap::KeyMapNode &node, const Q
|
||||||
m_ctrlSteerWheel.delayData.queuePos.clear();
|
m_ctrlSteerWheel.delayData.queuePos.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ctrlSteerWheel.delayData.queueTimer.enqueue(0);
|
sendTouchUpEvent(getTouchID(m_ctrlSteerWheel.touchKey), m_ctrlSteerWheel.delayData.currentPos);
|
||||||
m_ctrlSteerWheel.delayData.queuePos.enqueue(m_ctrlSteerWheel.delayData.currentPos);
|
detachTouchID(m_ctrlSteerWheel.touchKey);
|
||||||
m_ctrlSteerWheel.delayData.timer->start();
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +352,6 @@ void InputConvertGame::processSteerWheel(const KeyMap::KeyMapNode &node, const Q
|
||||||
if (pressedNum == 1 && flag) {
|
if (pressedNum == 1 && flag) {
|
||||||
m_ctrlSteerWheel.touchKey = from->key();
|
m_ctrlSteerWheel.touchKey = from->key();
|
||||||
int id = attachTouchID(m_ctrlSteerWheel.touchKey);
|
int id = attachTouchID(m_ctrlSteerWheel.touchKey);
|
||||||
qDebug() << "***************** attach:" << id;
|
|
||||||
sendTouchDownEvent(id, node.data.steerWheel.centerPos);
|
sendTouchDownEvent(id, node.data.steerWheel.centerPos);
|
||||||
|
|
||||||
getDelayQueue(node.data.steerWheel.centerPos, node.data.steerWheel.centerPos+offset,
|
getDelayQueue(node.data.steerWheel.centerPos, node.data.steerWheel.centerPos+offset,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue