mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 19:44:59 +00:00
feat: mac enable keymap
This commit is contained in:
parent
774a37a572
commit
456af4fdb0
3 changed files with 12 additions and 2 deletions
|
@ -48,6 +48,10 @@ int main(int argc, char *argv[])
|
|||
qputenv("QTSCRCPY_CONFIG_PATH", "../../../../config");
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
qputenv("QTSCRCPY_KEYMAP_PATH", "../../../../../../keymap");
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/linux/adb");
|
||||
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server");
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<string>1.2.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.10</string>
|
||||
<key>NSAppleEventsUsageDescription</key>
|
||||
<string>play game need this</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2018-2038 rankun. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
|
|
|
@ -62,10 +62,14 @@ static CGEventRef Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type
|
|||
eventLocation = CGEventGetUnflippedLocation(event);
|
||||
windowRect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
||||
|
||||
windowRect.origin.x += 100;
|
||||
windowRect.origin.y += 30;
|
||||
windowRect.size.width -= 180;
|
||||
windowRect.size.height -= 60;
|
||||
|
||||
newWindowRect = NSMakeRect(windowRect.origin.x, windowRect.origin.y,
|
||||
windowRect.size.width - 10, windowRect.size.height - 10);
|
||||
qDebug() << newWindowRect.origin.x << newWindowRect.origin.y
|
||||
<< newWindowRect.size.width << newWindowRect.size.height;
|
||||
//qDebug() << newWindowRect.origin.x << newWindowRect.origin.y << newWindowRect.size.width << newWindowRect.size.height;
|
||||
|
||||
if (!NSMouseInRect(NSPointFromCGPoint(eventLocation), newWindowRect, NO)) {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue