| 110 | } |
| 111 | |
| 112 | void config_init_option(std::string user_path, maajs::OptionalParam<std::string> default_json) |
| 113 | { |
| 114 | #ifdef MAA_JS_WITH_TOOLKIT |
| 115 | if (!MaaToolkitConfigInitOption(user_path.c_str(), default_json.value_or("{}").c_str())) { |
| 116 | throw maajs::MaaError { "Global config_init_option failed" }; |
| 117 | } |
| 118 | #else |
| 119 | std::ignore = default_json; |
| 120 | std::cout << "Warning: Global.config_init_option is deprecated in AgentServer; only set_log_dir is applied." << std::endl; |
| 121 | auto log_dir = (std::filesystem::path(user_path) / "debug").string(); |
| 122 | set_log_dir(log_dir); |
| 123 | #endif |
| 124 | } |
| 125 | |
| 126 | maajs::ArrayBufferType resize_image(maajs::ArrayBufferType src, int32_t width, int32_t height) |
| 127 | { |
nothing calls this directly
no test coverage detected