From 52201c74faa7328453c864b8e2b0e6049540a1db Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Wed, 16 Nov 2022 22:17:55 +0800 Subject: [PATCH 1/9] feat: add minitouch control for posix --- src/MeoAssistant/Controller.cpp | 104 +++++++++++++++++++++++++++++--- src/MeoAssistant/Controller.h | 4 +- 2 files changed, 99 insertions(+), 9 deletions(-) diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index e356f7c724..c08cbbe239 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -7,7 +7,11 @@ #include #else #include +#include #include +#ifndef __APPLE__ +#include +#endif #include #include #endif @@ -453,6 +457,12 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) constexpr int PipeReadBuffSize = 4096ULL; constexpr int PipeWriteBuffSize = 64 * 1024ULL; std::string pipe_str; + + auto check_timeout = [&](const auto& start_time) -> bool { + using namespace std::chrono_literals; + return std::chrono::steady_clock::now() - start_time < 3s; + }; + #ifdef _WIN32 SECURITY_ATTRIBUTES sa_attr_inherit { .nLength = sizeof(SECURITY_ATTRIBUTES), @@ -493,16 +503,12 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) } auto start_time = std::chrono::steady_clock::now(); - auto check_timeout = [&]() -> bool { - using namespace std::chrono_literals; - return std::chrono::steady_clock::now() - start_time < 3s; - }; auto pipe_buffer = std::make_unique(PipeReadBuffSize); OVERLAPPED pipeov { .hEvent = CreateEventW(nullptr, TRUE, FALSE, nullptr) }; std::ignore = ReadFile(pipe_parent_read, pipe_buffer.get(), PipeReadBuffSize, nullptr, &pipeov); - while (!need_exit() && check_timeout()) { + while (!need_exit() && check_timeout(start_time)) { if (pipe_str.find('$') != std::string::npos) { break; } @@ -518,12 +524,81 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) pipe_parent_read = INVALID_HANDLE_VALUE; m_minitouch_parent_write = pipe_parent_write; -#else // !_WIN32 +#else // !_WIN32 // TODO + + pid_t pid = 0; + int pipe_to_child[2]; + int pipe_from_child[2]; + + if (::pipe(pipe_to_child)) return false; + if (::pipe(pipe_from_child)) return false; + + pid = fork(); + if (pid < 0) return false; + if (pid == 0) { // child process + if (::dup2(pipe_to_child[0], STDIN_FILENO) < 0 || ::close(pipe_to_child[1]) < 0 || + ::close(pipe_from_child[0]) < 0 || ::dup2(pipe_from_child[1], STDOUT_FILENO) < 0 || + ::dup2(pipe_from_child[1], STDERR_FILENO) < 0) { + ::exit(-1); + } + + // set stdin of child to blocking + if (int val = ::fcntl(STDIN_FILENO, F_GETFL); val != -1 && (val & O_NONBLOCK)) { + val &= ~O_NONBLOCK; + ::fcntl(STDIN_FILENO, F_SETFL, val); + } + +#ifndef __APPLE__ + ::prctl(PR_SET_PDEATHSIG, SIGTERM); +#endif + + ::execlp("/bin/sh", "sh", "-c", cmd.c_str(), nullptr); + exit(-1); + } + + if (::close(pipe_from_child[1]) < 0 || ::close(pipe_to_child[0]) < 0) { + return false; + } + + // set stdout to non blocking + if (int val = ::fcntl(pipe_from_child[0], F_GETFL); val != -1) { + val |= O_NONBLOCK; + ::fcntl(pipe_from_child[0], F_SETFL, val); + } + else + return false; + + const auto start_time = std::chrono::steady_clock::now(); + + // TODO: kill child on fail + + while (true) { + if (need_exit()) return false; + if (!check_timeout(start_time)) { + Log.info("cannot find $ from pipe_str:", Logger::separator::newline, pipe_str); + return false; + } + + if (pipe_str.find('$') != std::string::npos) { + break; + } + + char buf_from_child[PipeReadBuffSize]; + ssize_t ret = ::read(pipe_from_child[0], buf_from_child, PipeReadBuffSize); + if (ret <= 0) continue; + pipe_str.insert(pipe_str.end(), buf_from_child, buf_from_child + ret); + } + + ::dup2(::open("/dev/null", O_WRONLY), pipe_from_child[0]); + + m_minitouch_process = pid; + m_write_to_minitouch_fd = pipe_to_child[1]; + std::ignore = pipe_str; std::ignore = PipeReadBuffSize; std::ignore = PipeWriteBuffSize; - return false; + // return false; #endif // _WIN32 Log.info("pipe str", Logger::separator::newline, pipe_str); @@ -567,6 +642,10 @@ bool asst::Controller::input_to_minitouch(const std::string& cmd) return cmd.size() == written; #else + // TODO + if (m_minitouch_process < 0 || m_write_to_minitouch_fd < 0) return false; + if (::write(m_write_to_minitouch_fd, cmd.c_str(), cmd.length()) >= 0) return true; + Log.error("Failed to write to minitouch, err", errno); return false; #endif } @@ -594,7 +673,16 @@ void asst::Controller::release_minitouch(bool force) CloseHandle(m_minitouch_parent_write); m_minitouch_parent_write = nullptr; } - +#else + if (m_write_to_minitouch_fd != -1) { + ::close(m_write_to_minitouch_fd); + m_write_to_minitouch_fd = -1; + } + if (m_minitouch_process > 0) { + ::kill(m_minitouch_process, SIGTERM); + if (force) ::kill(m_minitouch_process, SIGKILL); + m_minitouch_process = -1; + } #endif // _WIN32 } diff --git a/src/MeoAssistant/Controller.h b/src/MeoAssistant/Controller.h index bf1285b216..209dd4490d 100644 --- a/src/MeoAssistant/Controller.h +++ b/src/MeoAssistant/Controller.h @@ -4,6 +4,7 @@ #include "Utils/Platform/SafeWindows.h" #include #else +#include #include #include #endif @@ -13,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -173,6 +173,8 @@ namespace asst PROCESS_INFORMATION m_minitouch_process_info = { nullptr }; ASST_AUTO_DEDUCED_ZERO_INIT_END #else + ::pid_t m_minitouch_process = -1; + int m_write_to_minitouch_fd = -1; // TODO #endif From 9013c7d5607ef5b664ab7c2a7d27a65182d7487c Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Thu, 17 Nov 2022 21:52:50 +0800 Subject: [PATCH 2/9] feat: update controller for posix --- src/MeoAssistant/Controller.cpp | 43 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index c08cbbe239..4a17b46c92 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -499,6 +499,7 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) if (!create_ret) { DWORD err = GetLastError(); Log.error("Failed to create process for minitouch, err", err); + release_minitouch(true); return false; } @@ -525,17 +526,22 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) m_minitouch_parent_write = pipe_parent_write; #else // !_WIN32 - // TODO - pid_t pid = 0; int pipe_to_child[2]; int pipe_from_child[2]; if (::pipe(pipe_to_child)) return false; - if (::pipe(pipe_from_child)) return false; + if (::pipe(pipe_from_child)) { + ::close(pipe_to_child[0]); + ::close(pipe_to_child[1]); + return false; + } - pid = fork(); - if (pid < 0) return false; + ::pid_t pid = fork(); + if (pid < 0) { + Log.error("failed to create process"); + return false; + } if (pid == 0) { // child process if (::dup2(pipe_to_child[0], STDIN_FILENO) < 0 || ::close(pipe_to_child[1]) < 0 || ::close(pipe_from_child[0]) < 0 || ::dup2(pipe_from_child[1], STDOUT_FILENO) < 0 || @@ -557,7 +563,11 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) exit(-1); } + m_minitouch_process = pid; + m_write_to_minitouch_fd = pipe_to_child[1]; + if (::close(pipe_from_child[1]) < 0 || ::close(pipe_to_child[0]) < 0) { + release_minitouch(true); return false; } @@ -566,17 +576,20 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) val |= O_NONBLOCK; ::fcntl(pipe_from_child[0], F_SETFL, val); } - else + else { + release_minitouch(true); return false; - + } const auto start_time = std::chrono::steady_clock::now(); - // TODO: kill child on fail - while (true) { - if (need_exit()) return false; + if (need_exit()) { + release_minitouch(true); + return false; + } if (!check_timeout(start_time)) { - Log.info("cannot find $ from pipe_str:", Logger::separator::newline, pipe_str); + Log.info("unable to find $ from pipe_str:", Logger::separator::newline, pipe_str); + release_minitouch(true); return false; } @@ -592,13 +605,8 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) ::dup2(::open("/dev/null", O_WRONLY), pipe_from_child[0]); - m_minitouch_process = pid; - m_write_to_minitouch_fd = pipe_to_child[1]; - - std::ignore = pipe_str; - std::ignore = PipeReadBuffSize; std::ignore = PipeWriteBuffSize; - // return false; + #endif // _WIN32 Log.info("pipe str", Logger::separator::newline, pipe_str); @@ -642,7 +650,6 @@ bool asst::Controller::input_to_minitouch(const std::string& cmd) return cmd.size() == written; #else - // TODO if (m_minitouch_process < 0 || m_write_to_minitouch_fd < 0) return false; if (::write(m_write_to_minitouch_fd, cmd.c_str(), cmd.length()) >= 0) return true; Log.error("Failed to write to minitouch, err", errno); From 8d9a655a979991e6639f4a029d53a9928952e759 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 18 Nov 2022 21:44:02 +0800 Subject: [PATCH 3/9] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/Controller.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index 4a17b46c92..8d9802f1c8 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -605,8 +605,6 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) ::dup2(::open("/dev/null", O_WRONLY), pipe_from_child[0]); - std::ignore = PipeWriteBuffSize; - #endif // _WIN32 Log.info("pipe str", Logger::separator::newline, pipe_str); @@ -1276,7 +1274,6 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a { m_adb.connect = cmd_replace(adb_cfg.connect); auto connect_ret = call_command(m_adb.connect, 60LL * 1000, false /* adb 连接时不允许重试 */); - // 端口即使错误,命令仍然会返回0,TODO 对connect_result进行判断 bool is_connect_success = false; if (connect_ret) { auto& connect_str = connect_ret.value(); From e80f4fcddbc38aa2b2424344ae0b6bcd9cd9f3fa Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Sat, 19 Nov 2022 00:47:30 +0800 Subject: [PATCH 4/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9F=BA=E5=BB=BA?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=BF=83=E6=83=85=E9=98=88=E5=80=BC=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8E=E5=AE=9E=E9=99=85=E4=B8=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAsstGui/ViewModels/SettingsViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs index db1bfdf62c..afbd63c5d1 100644 --- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs +++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs @@ -536,8 +536,8 @@ namespace MeoAsstGui get => _dormThreshold; set { - DormThresholdLabel = Localization.GetString("DormThreshold") + ": " + _dormThreshold + "%"; SetAndNotify(ref _dormThreshold, value); + DormThresholdLabel = Localization.GetString("DormThreshold") + ": " + _dormThreshold + "%"; ViewStatusStorage.Set("Infrast.DormThreshold", value.ToString()); } } From 28fa465264a566b0316d2a234be7aa2aecfcabf9 Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Sat, 19 Nov 2022 19:42:33 +0800 Subject: [PATCH 5/9] docs: update docs --- docs/ja-jp/1.2-よくある質問.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ja-jp/1.2-よくある質問.md b/docs/ja-jp/1.2-よくある質問.md index f17905816c..cac57254cc 100644 --- a/docs/ja-jp/1.2-よくある質問.md +++ b/docs/ja-jp/1.2-よくある質問.md @@ -17,7 +17,7 @@ [NoAVX](../3rdparty/ppocr_noavx.zip)バージョンの `PaddleOCR` をダウンロードして解凍し、このアプリで同じ名前のファイルに置き換えてください。これは、`AVX` 命令セットをサポートしていないCPUのユーザー向けのパフォーマンス低下の代替手段であり、必要でない限り使用しないでください。 -_具体的には、[CPU-Z](https://www.cpuid.com/softwares/cpu-z.html)をダウンロードし、「命令セット」に `AVX` があるかどうかで判断できます。_ +_具体的には、[CPU-Z](https://www.cpuid.com/softwares/cpu-z.html) をダウンロードし、「命令セット」に `AVX` があるかどうかで判断できます。_ ### 可能性3:ほかのランタイムライブラリの問題 From b43f05e0864e2c67c19adb639761e1b7c0cb2375 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 19 Nov 2022 21:36:08 +0800 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E4=B8=8A=E7=AB=96=E5=B1=8F=E6=97=B6?= =?UTF-8?q?minitouch=E5=9D=90=E6=A0=87=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/Controller.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index 3a3129fde5..c740cfd02e 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -538,13 +538,19 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) } std::string key_info = pipe_str.substr(s_pos + 1, e_pos - s_pos - 1); Log.info("minitouch key props", key_info); + int size_1 = 0, size_2 = 0; std::stringstream ss; ss << key_info; ss >> m_minitouch_props.max_contacts; - ss >> m_minitouch_props.max_x; - ss >> m_minitouch_props.max_y; + ss >> size_1; + ss >> size_2; ss >> m_minitouch_props.max_pressure; + // 有些模拟器在竖屏分辨率时,这里的输出是反过来的 + // 考虑到应该没人竖屏玩明日方舟,所以取较大值为 x,较小值为 y + m_minitouch_props.max_x = std::max(size_1, size_2); + m_minitouch_props.max_y = std::min(size_1, size_2); + m_minitouch_props.x_scaling = static_cast(m_minitouch_props.max_x) / m_width; m_minitouch_props.y_scaling = static_cast(m_minitouch_props.max_y) / m_height; @@ -554,7 +560,7 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) bool asst::Controller::input_to_minitouch(const std::string& cmd) { - // Log.info("Input to minitouch", Logger::separator::newline, cmd); + Log.info("Input to minitouch", Logger::separator::newline, cmd); #ifdef _WIN32 DWORD written = 0; @@ -750,8 +756,8 @@ std::optional asst::Controller::init_socket(const std::string& l socklen_t addrlen = sizeof(m_server_sock_addr); int getname_ret = ::getsockname(m_server_sock, reinterpret_cast(&m_server_sock_addr), &addrlen); int listen_ret = ::listen(m_server_sock, 3); - struct timeval timeout = {6,0}; - int timeout_ret = ::setsockopt(m_server_sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(struct timeval)); + struct timeval timeout = { 6, 0 }; + int timeout_ret = ::setsockopt(m_server_sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout, sizeof(struct timeval)); server_start = bind_ret == 0 && getname_ret == 0 && listen_ret == 0 && timeout_ret == 0; #endif From 00a111f343cfa3e383a1a5929f613b5c70e2a3e3 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 19 Nov 2022 22:28:22 +0800 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=96=AD=E5=BC=80=E9=87=8D=E8=BF=9E=E5=90=8Eminitouch=E4=B8=8D?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/Controller.cpp | 24 +++++++++++++++++------- src/MeoAssistant/Controller.h | 5 +++-- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index c740cfd02e..9f51ee28a0 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -412,6 +412,7 @@ std::optional asst::Controller::call_command(const std::string& cmd is_reconnect_success = reconnect_str.find("error") == std::string::npos; } if (is_reconnect_success) { + call_and_hup_minitouch(m_adb.call_minitouch); auto recall_ret = call_command(cmd, timeout, false /* 禁止重连避免无限递归 */, recv_by_socket); if (recall_ret) { // 重连并成功执行了 @@ -447,6 +448,8 @@ void asst::Controller::callback(AsstMsg msg, const json::value& details) bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) { LogTraceFunction; + release_minitouch(true); + Log.info(cmd); m_minitouch_avaiable = false; @@ -560,9 +563,15 @@ bool asst::Controller::call_and_hup_minitouch(const std::string& cmd) bool asst::Controller::input_to_minitouch(const std::string& cmd) { +#ifdef ASST_DEBUG Log.info("Input to minitouch", Logger::separator::newline, cmd); +#endif #ifdef _WIN32 + if (m_minitouch_parent_write == INVALID_HANDLE_VALUE) { + Log.error("minitouch write handle invalid", m_minitouch_parent_write); + return false; + } DWORD written = 0; if (!WriteFile(m_minitouch_parent_write, cmd.c_str(), static_cast(cmd.size() * sizeof(std::string::value_type)), &written, NULL)) { @@ -588,17 +597,17 @@ void asst::Controller::release_minitouch(bool force) #ifdef _WIN32 - if (m_minitouch_process_info.hProcess) { + if (m_minitouch_process_info.hProcess != INVALID_HANDLE_VALUE) { CloseHandle(m_minitouch_process_info.hProcess); - m_minitouch_process_info.hProcess = nullptr; + m_minitouch_process_info.hProcess = INVALID_HANDLE_VALUE; } - if (m_minitouch_process_info.hThread) { + if (m_minitouch_process_info.hThread != INVALID_HANDLE_VALUE) { CloseHandle(m_minitouch_process_info.hThread); - m_minitouch_process_info.hThread = nullptr; + m_minitouch_process_info.hThread = INVALID_HANDLE_VALUE; } - if (m_minitouch_parent_write) { + if (m_minitouch_parent_write != INVALID_HANDLE_VALUE) { CloseHandle(m_minitouch_parent_write); - m_minitouch_parent_write = nullptr; + m_minitouch_parent_write = INVALID_HANDLE_VALUE; } #endif // _WIN32 @@ -1425,7 +1434,8 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a call_command(minitouch_cmd_rep(adb_cfg.push_minitouch)); call_command(minitouch_cmd_rep(adb_cfg.chmod_minitouch)); - call_and_hup_minitouch(minitouch_cmd_rep(adb_cfg.call_minitouch)); + m_adb.call_minitouch = minitouch_cmd_rep(adb_cfg.call_minitouch); + call_and_hup_minitouch(m_adb.call_minitouch); std::string orientation_str = call_command(cmd_replace(adb_cfg.orientation)).value_or("0"); auto [beg, end] = ranges::remove_if(orientation_str, [](char ch) -> bool { return !std::isdigit(ch); }); diff --git a/src/MeoAssistant/Controller.h b/src/MeoAssistant/Controller.h index c4bdc4b88e..89eeefee7a 100644 --- a/src/MeoAssistant/Controller.h +++ b/src/MeoAssistant/Controller.h @@ -134,6 +134,7 @@ namespace asst { /* command */ std::string connect; + std::string call_minitouch; std::string click; std::string swipe; @@ -168,9 +169,9 @@ namespace asst bool m_minitouch_avaiable = false; // 状态 #ifdef _WIN32 - HANDLE m_minitouch_parent_write = nullptr; + HANDLE m_minitouch_parent_write = INVALID_HANDLE_VALUE; ASST_AUTO_DEDUCED_ZERO_INIT_START - PROCESS_INFORMATION m_minitouch_process_info = { nullptr }; + PROCESS_INFORMATION m_minitouch_process_info = { INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, 0, 0 }; ASST_AUTO_DEDUCED_ZERO_INIT_END #else // TODO From 0a319ff297be535c00a04f33a242d7533e9de375 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 19 Nov 2022 22:36:11 +0800 Subject: [PATCH 8/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DEN=E6=9C=8D?= =?UTF-8?q?=E8=82=89=E9=B8=BD=E5=8D=A1=E4=BD=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/2803 --- resource/global/YoStarEN/resource/tasks.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resource/global/YoStarEN/resource/tasks.json b/resource/global/YoStarEN/resource/tasks.json index 4af4ac75a1..3cb65ab38d 100644 --- a/resource/global/YoStarEN/resource/tasks.json +++ b/resource/global/YoStarEN/resource/tasks.json @@ -162,6 +162,9 @@ "Storage full" ] }, + "Phantom@Roguelike@StageEncounterOptionUnknown": { + "templThreshold": 0.9 + }, "BattleStageName": { "Doc": "该任务的 ocrReplace 被所有涉及Rouge-like的English识别任务复用", "ocrReplace": [ From 2dc6feff0d51b472ac8d49ed0fa06d2c7dbc9e67 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 19 Nov 2022 22:50:03 +0800 Subject: [PATCH 9/9] docs: update changelog --- CHANGELOG.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eba5fe8432..4338851dc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,7 @@ **若更新后滑动操作没反应、自动战斗没反应、肉鸽不上人等,请进入 `设置` - `连接设置` - `强制替换 ADB`** -- 修复 使用中文路径时,minitouch 出现的一系列错误 @MistEO -- 修复 使用竖屏、旋转 180° 等时,minitouch 的操作错误 @MistEO -- 修复 POSIX 下 socket 超时时间过长的问题 @aa889788 -- 优化 自定义基建 内置 243 3 换作业 @Black1312 -- 新增 自定义基建 `description_post` 字段,整理内置作业格式 @MistEO -- 更新 文档 @DavidWang19 +- 新增 macOS 对 minitouch 的支持(但没完全支持 @horror-proton @hguandl +- 修复 minitouch 在部署竖屏模拟器上的操作错误 @MistEO +- 修复 模拟器断开重连后,minitouch 无法继续工作的问题 @MistEO +- 修复 界面 基建设置心情阈值显示错误的问题 @ABA2396 +- Fix a dead loop when recruiting opers in the auto-IS function of EN client @MistEO