MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / post_swipe

Method post_swipe

source/MaaAgentServer/RemoteInstance/RemoteController.cpp:105–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105MaaCtrlId RemoteController::post_swipe(int x1, int y1, int x2, int y2, int duration, int contact, int pressure)
106{
107 ControllerPostSwipeReverseRequest req {
108 .controller_id = controller_id_,
109 .x1 = x1,
110 .y1 = y1,
111 .x2 = x2,
112 .y2 = y2,
113 .duration = duration,
114 .contact = contact,
115 .pressure = pressure,
116 };
117 auto resp_opt = server_.send_and_recv<ControllerPostSwipeReverseResponse>(req);
118 if (!resp_opt) {
119 return MaaInvalidId;
120 }
121 return resp_opt->ctrl_id;
122}
123
124MaaCtrlId RemoteController::post_click_key(int keycode)
125{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected