File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -96,25 +96,7 @@ void moveMouse(MMPointInt32 point){
9696
9797 XSync (display , false);
9898 #elif defined(IS_WINDOWS )
99- // Mouse motion is now done using SendInput with MOUSEINPUT.
100- // We use Absolute mouse positioning
101- #define MOUSE_COORD_TO_ABS (coord , width_or_height ) ( \
102- ((65536 * coord) / width_or_height) + (coord < 0 ? -1 : 1))
103-
104- MMRectInt32 rect = getScreenRect (1 );
105- int32_t x = MOUSE_COORD_TO_ABS (point .x - rect .origin .x , rect .size .w );
106- int32_t y = MOUSE_COORD_TO_ABS (point .y - rect .origin .y , rect .size .h );
107-
108- INPUT mouseInput ;
109- mouseInput .type = INPUT_MOUSE ;
110- mouseInput .mi .dx = x ;
111- mouseInput .mi .dy = y ;
112- mouseInput .mi .dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE | MOUSEEVENTF_VIRTUALDESK ;
113- mouseInput .mi .time = 0 ; // System will provide the timestamp
114-
115- mouseInput .mi .dwExtraInfo = 0 ;
116- mouseInput .mi .mouseData = 0 ;
117- SendInput (1 , & mouseInput , sizeof (mouseInput ));
99+ SetCursorPos (point .x , point .y );
118100 #endif
119101}
120102
You can’t perform that action at this time.
0 commit comments