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

Function config_init_option

source/binding/NodeJS/src/apis/global.cpp:112–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void 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
126maajs::ArrayBufferType resize_image(maajs::ArrayBufferType src, int32_t width, int32_t height)
127{

Callers

nothing calls this directly

Calls 2

set_log_dirFunction · 0.85

Tested by

no test coverage detected