From 22348523f31f7a5a9fc1c02dfe4ac082bbbf1ebf Mon Sep 17 00:00:00 2001 From: RainbowXie <34147843+RainbowXie@users.noreply.github.com> Date: Mon, 23 Aug 2021 11:08:06 +0800 Subject: [PATCH] Qt api update Qt::MidButton': MidButton is deprecated. Use MiddleButton instead --- .../device/controller/inputconvert/inputconvertnormal.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QtScrcpy/device/controller/inputconvert/inputconvertnormal.cpp b/QtScrcpy/device/controller/inputconvert/inputconvertnormal.cpp index 260604e..a19be58 100644 --- a/QtScrcpy/device/controller/inputconvert/inputconvertnormal.cpp +++ b/QtScrcpy/device/controller/inputconvert/inputconvertnormal.cpp @@ -132,7 +132,11 @@ AndroidMotioneventButtons InputConvertNormal::convertMouseButtons(Qt::MouseButto if (buttonState & Qt::RightButton) { buttons |= AMOTION_EVENT_BUTTON_SECONDARY; } +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + if (buttonState & Qt::MiddleButton) { +#else if (buttonState & Qt::MidButton) { +#endif buttons |= AMOTION_EVENT_BUTTON_TERTIARY; } if (buttonState & Qt::XButton1) {