Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 18, 2023
1 parent b9f8f36 commit f20f20a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions source/MaaControlUnit/ControlUnitMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ std::shared_ptr<ControlUnitAPI> create_adb_controller_unit(MaaStringView adb_pat

std::shared_ptr<MaatouchInput> maatouch_unit = nullptr;

auto agent_stdpath = MAA_NS::path(agent_path);
auto minitouch_path = agent_stdpath / MAA_NS::path("minitouch");
auto maatouch_path = agent_stdpath / MAA_NS::path("maatouch");
auto minicap_path = agent_stdpath / MAA_NS::path("minicap");
auto agent_stdpath = path(agent_path);
auto minitouch_path = agent_stdpath / path("minitouch");
auto maatouch_path = agent_stdpath / path("maatouch");
auto minicap_path = agent_stdpath / path("minicap");

switch (touch_type) {
case MaaAdbControllerType_Touch_Adb:
Expand Down Expand Up @@ -381,9 +381,9 @@ std::shared_ptr<TouchInputAPI> create_adb_touch_input(MaaStringView adb_path, Ma
return nullptr;
}

auto agent_stdpath = MAA_NS::path(agent_path);
auto minitouch_path = agent_stdpath / MAA_NS::path("minitouch");
auto maatouch_path = agent_stdpath / MAA_NS::path("maatouch");
auto agent_stdpath = path(agent_path);
auto minitouch_path = agent_stdpath / path("minitouch");
auto maatouch_path = agent_stdpath / path("maatouch");

std::shared_ptr<TouchInputBase> touch_unit = nullptr;
switch (type & MaaAdbControllerType_Touch_Mask) {
Expand Down Expand Up @@ -443,8 +443,8 @@ std::shared_ptr<KeyInputAPI> create_adb_key_input(MaaStringView adb_path, MaaStr
LogError << "Parse config failed, invalid config:" << config;
return nullptr;
}
auto agent_stdpath = MAA_NS::path(agent_path);
auto maatouch_path = agent_stdpath / MAA_NS::path("maatouch");
auto agent_stdpath = path(agent_path);
auto maatouch_path = agent_stdpath / path("maatouch");

std::shared_ptr<KeyInputBase> key_unit = nullptr;
switch (type & MaaAdbControllerType_Key_Mask) {
Expand Down Expand Up @@ -497,8 +497,8 @@ std::shared_ptr<ScreencapAPI> create_adb_screencap(MaaStringView adb_path, MaaSt
return nullptr;
}

auto agent_stdpath = MAA_NS::path(agent_path);
auto minicap_path = agent_stdpath / MAA_NS::path("minicap");
auto agent_stdpath = path(agent_path);
auto minicap_path = agent_stdpath / path("minicap");

std::shared_ptr<ScreencapBase> screencap_unit = nullptr;
switch (type & MaaAdbControllerType_Screencap_Mask) {
Expand Down
2 changes: 1 addition & 1 deletion source/MaaControlUnit/Input/MaatouchInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool MaatouchInput::init(int swidth, int sheight, int orientation)
return false;
}

const auto bin_path = agent_path_ / MAA_NS::path("universal") / MAA_NS::path("maatouch");
const auto bin_path = agent_path_ / path("universal") / path("maatouch");
if (!invoke_app_->push(bin_path)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion source/MaaControlUnit/Input/MinitouchInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool MinitouchInput::init(int swidth, int sheight, int orientation)
}
const std::string& target_arch = *arch_iter;

const auto bin_path = agent_path_ / MAA_NS::path(target_arch) / MAA_NS::path("minitouch");
const auto bin_path = agent_path_ / path(target_arch) / path("minitouch");
if (!invoke_app_->push(bin_path)) {
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions source/MaaControlUnit/Screencap/Minicap/MinicapBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ bool MinicapBase::init(int swidth, int sheight)
int fit_sdk = *sdk_iter;

// TODO: 确认低版本是否使用minicap-nopie
const auto bin_path = agent_path_ / MAA_NS::path(target_arch) / MAA_NS::path("bin") / MAA_NS::path("minicap");
const auto lib_path = agent_path_ / MAA_NS::path(target_arch) / MAA_NS::path("lib") /
MAA_NS::path("android-" + fit_sdk) / MAA_NS::path("minicap.so");
const auto bin_path = agent_path_ / path(target_arch) / path("bin") / path("minicap");
const auto lib_path = agent_path_ / path(target_arch) / path("lib") /
path(MAA_FMT::format("android-{}", fit_sdk)) / path("minicap.so");
if (!binary_->push(bin_path) || !library_->push(lib_path)) {
return false;
}
Expand Down

0 comments on commit f20f20a

Please sign in to comment.