| 379 | } |
| 380 | |
| 381 | MaaBool CustomRelativeMove(int32_t dx, int32_t dy, void* trans_arg) |
| 382 | { |
| 383 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 384 | auto ctx = customCtx->callbacks["relative_move"]; |
| 385 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 386 | return func.Call( |
| 387 | { |
| 388 | maajs::NumberType::New(func.Env(), dx), |
| 389 | maajs::NumberType::New(func.Env(), dy), |
| 390 | }); |
| 391 | }); |
| 392 | } |
| 393 | |
| 394 | MaaBool CustomShell(const char* cmd, int64_t timeout, void* trans_arg, MaaStringBuffer* buffer) |
| 395 | { |