diff --git a/source/MaaAdbControlUnit/API/AdbControlUnitAPI.cpp b/source/MaaAdbControlUnit/API/AdbControlUnitAPI.cpp index a28b6caab..2de180318 100644 --- a/source/MaaAdbControlUnit/API/AdbControlUnitAPI.cpp +++ b/source/MaaAdbControlUnit/API/AdbControlUnitAPI.cpp @@ -44,7 +44,7 @@ MaaControlUnitHandle MaaAdbControlUnitCreate( // std::shared_ptr 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"); diff --git a/source/MaaAdbControlUnit/Manager/ControlUnitMgr.cpp b/source/MaaAdbControlUnit/Manager/ControlUnitMgr.cpp index 06f14f12b..e139aba15 100644 --- a/source/MaaAdbControlUnit/Manager/ControlUnitMgr.cpp +++ b/source/MaaAdbControlUnit/Manager/ControlUnitMgr.cpp @@ -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; @@ -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;