MaaXYZ / MaaFramework

基于图像识别的自动化黑盒测试框架 | An automation black-box testing framework based on image recognition
GNU Lesser General Public License v3.0
1.1k stars 129 forks source link

使用夜神模拟器时,读取分辨率错误 #250

Closed qbk929 closed 1 month ago

qbk929 commented 1 month ago

尝试读取模拟器参数时,在最初还是1600900,但运行时读取成了900900

以下为使用Maa模板时maa.log 的运行记录 [2024-06-12 10:46:16.364][TRC][Px6436][Tx62249][UnitBase.cpp][L61][MaaNS::CtrlUnitNs::UnitBase::startup_and_read_pipe] output: 1600 900

[2024-06-12 10:46:16.364][DBG][Px6436][Tx62249][DeviceInfo.cpp][L99][MaaNS::CtrlUnitNs::DeviceInfo::requestorientation] | enter [2024-06-12 10:46:16.366][TRC][Px6436][Tx62249][ChildPipeIOStream.cpp][L100][MaaNS::ChildPipeIOStream::ChildPipeIOStream] [exec=D:/Program Files/Nox/bin/noxadb.exe] [args=["-s","127.0.0.1:62001","shell","dumpsys input | grep SurfaceOrientation | grep -m 1 -o -E [0-9]"]] [child_.id()=4288] [2024-06-12 10:46:16.411][TRC][Px6436][Tx62249][UnitBase.cpp][L59][MaaNS::CtrlUnitNs::UnitBase::startup_and_read_pipe] [output.size()=3] [duration=46ms] [2024-06-12 10:46:16.411][TRC][Px6436][Tx62249][UnitBase.cpp][L61][MaaNS::CtrlUnitNs::UnitBase::startup_and_read_pipe] output: 0

[2024-06-12 10:46:16.411][TRC][Px6436][Tx62249][DeviceInfo.cpp][L99][MaaNS::CtrlUnitNs::DeviceInfo::request_orientation] | leave, 47ms [2024-06-12 10:46:16.411][INF][Px6436][Tx62249][DeviceInfo.cpp][L82][MaaNS::CtrlUnitNs::DeviceInfo::request_resolution] portrait [orientation=0] [width=900] [height=900] [2024-06-12 10:46:16.411][TRC][Px6436][Tx62249][DeviceInfo.cpp][L54][MaaNS::CtrlUnitNs::DeviceInfo::request_resolution] | leave, 105ms [2024-06-12 10:46:16.411][DBG][Px6436][Tx62249][Utils/MessageNotifier.hpp][L23][MaaNS::MessageNotifier<void (_cdecl)(char const ,char const ,void ),void *>::notify] [callback=0000000000000000] [callbackarg=0000000000000000] [msg=Controller.ResolutionGot] [details={ "adb": "D:/Program Files/Nox/bin/nox_adb.exe", "address": "127.0.0.1:62001", "resolution": { "height": 900, "width": 900 }, "uuid": "624004f74bef005b" }] | enter

MistEO commented 1 month ago

完整日志发一下

MistEO commented 1 month ago

不用发了,找到问题了

蠢还是 C++ 蠢