| 71 | } |
| 72 | |
| 73 | bool MtouchHelper::parse_minitouch_config(const json::value& config) |
| 74 | { |
| 75 | if (!invoke_app_ || !adb_shell_input_) { |
| 76 | LogError << "invoke_app_ or adb_shell_input_ is nullptr"; |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | static const json::array kDefaultArch = { |
| 81 | "x86_64", "x86", "arm64-v8a", "armeabi-v7a", "armeabi", |
| 82 | }; |
| 83 | json::array jarch = config.get("prebuilt", "minitouch", "arch", kDefaultArch); |
| 84 | |
| 85 | if (!jarch.all<std::string>()) { |
| 86 | return false; |
| 87 | } |
| 88 | |
| 89 | arch_list_ = jarch.as<std::vector<std::string>>(); |
| 90 | |
| 91 | return invoke_app_->parse(config) && MtouchHelper::parse(config) && adb_shell_input_->parse(config); |
| 92 | } |
| 93 | |
| 94 | bool MtouchHelper::push_minitouch() |
| 95 | { |