From 5d460e5100fa38e2585236a45edd97761edf61d2 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 3 Feb 2022 03:14:44 -0800 Subject: [PATCH] Fixed CI build --- base/os.h | 3 +-- base/types.h | 1 + key/keypress_c.h | 2 +- mouse/mouse_c.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/os.h b/base/os.h index 8baad8a..6f6e74d 100644 --- a/base/os.h +++ b/base/os.h @@ -5,8 +5,7 @@ /* Python versions under 2.5 don't support this macro, but it's not * terribly difficult to replicate: */ #ifndef PyModule_AddIntMacro - #define PyModule_AddIntMacro(module, macro) \ - PyModule_AddIntConstant(module, #macro, macro) + #define PyModule_AddIntMacro(module, macro) PyModule_AddIntConstant(module, #macro, macro) #endif /* PyModule_AddIntMacro */ #if !defined(IS_MACOSX) && defined(__APPLE__) && defined(__MACH__) diff --git a/base/types.h b/base/types.h index 84f772c..01080d2 100644 --- a/base/types.h +++ b/base/types.h @@ -6,6 +6,7 @@ #include "inline_keywords.h" /* For H_INLINE */ #include #include +#include /* Some generic, cross-platform types. */ #ifdef RobotGo_64 diff --git a/key/keypress_c.h b/key/keypress_c.h index 74ead81..1f5511d 100644 --- a/key/keypress_c.h +++ b/key/keypress_c.h @@ -26,7 +26,7 @@ void X_KEY_EVENT_WAIT(Display *display, MMKeyCode key, bool is_press) { X_KEY_EVENT(display, key, is_press); - microsleep(DEADBEEF_UNIFORM(0.0, 0.5); + microsleep(DEADBEEF_UNIFORM(0.0, 0.5)); } #endif diff --git a/mouse/mouse_c.h b/mouse/mouse_c.h index 3b8fc6f..6e08d9a 100644 --- a/mouse/mouse_c.h +++ b/mouse/mouse_c.h @@ -122,7 +122,7 @@ void dragMouse(MMPointInt32 point, const MMMouseButton button){ #if defined(IS_MACOSX) const CGEventType dragType = MMMouseDragToCGEventType(button); CGEventRef drag = CGEventCreateMouseEvent(NULL, dragType, - CGPointFromMMPoint(point), (CGMouseButton)button); + CGPointFromMMPointInt32(point), (CGMouseButton)button); calculateDeltas(&drag, point); @@ -161,7 +161,7 @@ MMPointInt32 getMousePos() { /* Press down a button, or release it. */ void toggleMouse(bool down, MMMouseButton button) { #if defined(IS_MACOSX) - const CGPoint currentPos = CGPointFromMMPoint(getMousePos()); + const CGPoint currentPos = CGPointFromMMPointInt32(getMousePos()); const CGEventType mouseType = MMMouseToCGEventType(down, button); CGEventRef event = CGEventCreateMouseEvent(NULL, mouseType, currentPos, (CGMouseButton)button); @@ -196,7 +196,7 @@ void clickMouse(MMMouseButton button){ void doubleClick(MMMouseButton button){ #if defined(IS_MACOSX) /* Double click for Mac. */ - const CGPoint currentPos = CGPointFromMMPoint(getMousePos()); + const CGPoint currentPos = CGPointFromMMPointInt32(getMousePos()); const CGEventType mouseTypeDown = MMMouseToCGEventType(true, button); const CGEventType mouseTypeUP = MMMouseToCGEventType(false, button);