mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-04 14:48:37 +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");
|
qputenv("QTSCRCPY_CONFIG_PATH", "../../../../config");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_OSX
|
||||||
|
qputenv("QTSCRCPY_KEYMAP_PATH", "../../../../../../keymap");
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/linux/adb");
|
qputenv("QTSCRCPY_ADB_PATH", "../../../third_party/adb/linux/adb");
|
||||||
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server");
|
qputenv("QTSCRCPY_SERVER_PATH", "../../../third_party/scrcpy-server");
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<string>1.2.0</string>
|
<string>1.2.0</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.10</string>
|
<string>10.10</string>
|
||||||
|
<key>NSAppleEventsUsageDescription</key>
|
||||||
|
<string>play game need this</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2018-2038 rankun. All rights reserved.</string>
|
<string>Copyright © 2018-2038 rankun. All rights reserved.</string>
|
||||||
<key>NSMainStoryboardFile</key>
|
<key>NSMainStoryboardFile</key>
|
||||||
|
|
|
@ -62,10 +62,14 @@ static CGEventRef Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type
|
||||||
eventLocation = CGEventGetUnflippedLocation(event);
|
eventLocation = CGEventGetUnflippedLocation(event);
|
||||||
windowRect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
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,
|
newWindowRect = NSMakeRect(windowRect.origin.x, windowRect.origin.y,
|
||||||
windowRect.size.width - 10, windowRect.size.height - 10);
|
windowRect.size.width - 10, windowRect.size.height - 10);
|
||||||
qDebug() << newWindowRect.origin.x << newWindowRect.origin.y
|
//qDebug() << newWindowRect.origin.x << newWindowRect.origin.y << newWindowRect.size.width << newWindowRect.size.height;
|
||||||
<< newWindowRect.size.width << newWindowRect.size.height;
|
|
||||||
|
|
||||||
if (!NSMouseInRect(NSPointFromCGPoint(eventLocation), newWindowRect, NO)) {
|
if (!NSMouseInRect(NSPointFromCGPoint(eventLocation), newWindowRect, NO)) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue