mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
fix: remove some warning on win
This commit is contained in:
parent
37eb5b8f06
commit
231591eeb5
4 changed files with 8 additions and 7 deletions
|
@ -36,7 +36,7 @@ void Controller::postControlMsg(ControlMsg *controlMsg)
|
|||
void Controller::test(QRect rc)
|
||||
{
|
||||
ControlMsg *controlMsg = new ControlMsg(ControlMsg::CMT_INJECT_TOUCH);
|
||||
controlMsg->setInjectTouchMsgData(POINTER_ID_MOUSE, AMOTION_EVENT_ACTION_DOWN, AMOTION_EVENT_BUTTON_PRIMARY, rc, 1.0f);
|
||||
controlMsg->setInjectTouchMsgData(static_cast<quint64>(POINTER_ID_MOUSE), AMOTION_EVENT_ACTION_DOWN, AMOTION_EVENT_BUTTON_PRIMARY, rc, 1.0f);
|
||||
postControlMsg(controlMsg);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#define CONTROL_MSG_TEXT_MAX_LENGTH 300
|
||||
#define CONTROL_MSG_CLIPBOARD_TEXT_MAX_LENGTH 4093
|
||||
#define POINTER_ID_MOUSE UINT64_C(-1)
|
||||
#define POINTER_ID_MOUSE static_cast<quint64>(-1)
|
||||
// ControlMsg
|
||||
class ControlMsg : public QScrcpyEvent
|
||||
{
|
||||
|
|
|
@ -43,7 +43,8 @@ void InputConvertNormal::mouseEvent(const QMouseEvent *from, const QSize &frameS
|
|||
if (!controlMsg) {
|
||||
return;
|
||||
}
|
||||
controlMsg->setInjectTouchMsgData(POINTER_ID_MOUSE, action, convertMouseButtons(from->buttons()), QRect(pos.toPoint(), frameSize), 1.0f);
|
||||
controlMsg->setInjectTouchMsgData(
|
||||
static_cast<quint64>(POINTER_ID_MOUSE), action, convertMouseButtons(from->buttons()), QRect(pos.toPoint(), frameSize), 1.0f);
|
||||
sendControlMsg(controlMsg);
|
||||
}
|
||||
|
||||
|
@ -134,7 +135,7 @@ AndroidMotioneventButtons InputConvertNormal::convertMouseButtons(Qt::MouseButto
|
|||
if (buttonState & Qt::XButton2) {
|
||||
buttons |= AMOTION_EVENT_BUTTON_FORWARD;
|
||||
}
|
||||
return (AndroidMotioneventButtons)buttons;
|
||||
return static_cast<AndroidMotioneventButtons>(buttons);
|
||||
}
|
||||
|
||||
AndroidKeycode InputConvertNormal::convertKeyCode(int key, Qt::KeyboardModifiers modifiers)
|
||||
|
@ -338,5 +339,5 @@ AndroidMetastate InputConvertNormal::convertMetastate(Qt::KeyboardModifiers modi
|
|||
// no mapping?
|
||||
}
|
||||
*/
|
||||
return (AndroidMetastate)metastate;
|
||||
return static_cast<AndroidMetastate>(metastate);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ bool Stream::recvPacket(AVPacket *packet)
|
|||
|
||||
quint64 pts = bufferRead64be(header);
|
||||
quint32 len = bufferRead32be(&header[8]);
|
||||
Q_ASSERT(pts == NO_PTS || (pts & 0x8000000000000000) == 0);
|
||||
Q_ASSERT(pts == static_cast<quint64>(NO_PTS) || (pts & 0x8000000000000000) == 0);
|
||||
Q_ASSERT(len);
|
||||
|
||||
if (av_new_packet(packet, len)) {
|
||||
|
@ -244,7 +244,7 @@ bool Stream::recvPacket(AVPacket *packet)
|
|||
return false;
|
||||
}
|
||||
|
||||
packet->pts = pts != NO_PTS ? (int64_t)pts : AV_NOPTS_VALUE;
|
||||
packet->pts = pts != NO_PTS ? static_cast<int64_t>(pts) : static_cast<int64_t>(AV_NOPTS_VALUE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue