Skip to content

Commit

Permalink
fix: 修复 adb control unit 初始化错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Nov 27, 2023
1 parent 1f06840 commit 3aca3b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/MaaAdbControlUnit/API/AdbControlUnitAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MaaControlUnitHandle MaaAdbControlUnitCreate( //

std::shared_ptr<MaatouchInput> maatouch_unit = nullptr;

auto agent_stdpath = path(agent_path);
auto agent_stdpath = std::filesystem::absolute(path(agent_path));
auto minitouch_path = agent_stdpath / path("minitouch");
auto maatouch_path = agent_stdpath / path("maatouch");
auto minicap_path = agent_stdpath / path("minicap");
Expand Down
4 changes: 2 additions & 2 deletions source/MaaAdbControlUnit/Manager/ControlUnitMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ bool ControlUnitMgr::connect()
notifier.notify(MaaMsg_Controller_ConnectSuccess, details);

if (screencap_) {
if (screencap_->init(width, height)) {
if (!screencap_->init(width, height)) {
LogError << "failed to init screencap";
notifier.notify(MaaMsg_Controller_ScreencapInitFailed, details);
return false;
Expand All @@ -80,7 +80,7 @@ bool ControlUnitMgr::connect()
}

if (touch_input_) {
if (touch_input_->init(width, height, orientation)) {
if (!touch_input_->init(width, height, orientation)) {
LogError << "failed to init touch_input";
notifier.notify(MaaMsg_Controller_TouchInputInitFailed, details);
return false;
Expand Down

0 comments on commit 3aca3b9

Please sign in to comment.