| 417 | } |
| 418 | |
| 419 | MaaBool CustomGetInfo(void* trans_arg, MaaStringBuffer* buffer) |
| 420 | { |
| 421 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 422 | auto ctx = customCtx->callbacks["get_info"]; |
| 423 | auto result = ctx->Call<std::optional<std::string>>([&](maajs::FunctionType func) { return func.Call({ }); }); |
| 424 | if (result) { |
| 425 | StringBuffer(buffer, false).set(*result); |
| 426 | return true; |
| 427 | } |
| 428 | else { |
| 429 | StringBuffer(buffer, false).set("{}"); |
| 430 | return true; |
| 431 | } |
| 432 | } |
nothing calls this directly
no test coverage detected