mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
Merge branch 'dev' of https://github.com/MaaAssistantArknights/MaaAssistantArknights into arm64
This commit is contained in:
@@ -797,7 +797,7 @@ bool asst::Controller::swipe_without_scale(const Point& p1, const Point& p2, int
|
||||
const auto& opt = Config.get_options();
|
||||
if (m_minitouch_enabled && m_minitouch_available) {
|
||||
Log.trace(m_use_maa_touch ? "maatouch" : "minitouch", "swipe", p1, p2, duration, extra_swipe, slope_in,
|
||||
slope_out);
|
||||
slope_out);
|
||||
Minitoucher toucher(std::bind(&Controller::input_to_minitouch, this, std::placeholders::_1), m_minitouch_props);
|
||||
toucher.down(x1, y1);
|
||||
|
||||
@@ -896,6 +896,11 @@ bool asst::Controller::support_swipe_with_pause() const noexcept
|
||||
return m_minitouch_enabled && m_minitouch_available && m_swipe_with_pause_enabled && !m_adb.press_esc.empty();
|
||||
}
|
||||
|
||||
bool asst::Controller::support_precise_swipe() const noexcept
|
||||
{
|
||||
return m_minitouch_enabled && m_minitouch_available;
|
||||
}
|
||||
|
||||
bool asst::Controller::connect(const std::string& adb_path, const std::string& address, const std::string& config)
|
||||
{
|
||||
LogTraceFunction;
|
||||
@@ -1600,7 +1605,7 @@ std::optional<int> asst::Controller::call_command_posix(const std::string& cmd,
|
||||
if (client_socket < 0) {
|
||||
Log.error("accept failed:", strerror(errno));
|
||||
::kill(m_child, SIGKILL);
|
||||
::waitpid(m_child, &exit_ret, 0);
|
||||
::waitpid(m_child, &exit_ret, 0);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -1621,7 +1626,8 @@ std::optional<int> asst::Controller::call_command_posix(const std::string& cmd,
|
||||
}
|
||||
} while (::waitpid(m_child, &exit_ret, WNOHANG) == 0 && !check_timeout());
|
||||
}
|
||||
::waitpid(m_child, &exit_ret, 0); // if ::waitpid(m_child, &exit_ret, WNOHANG) == 0, repeat it will cause ECHILD, so not check the return value
|
||||
::waitpid(m_child, &exit_ret, 0); // if ::waitpid(m_child, &exit_ret, WNOHANG) == 0, repeat it will cause
|
||||
// ECHILD, so not check the return value
|
||||
}
|
||||
else {
|
||||
// failed to create child process
|
||||
|
||||
Reference in New Issue
Block a user