MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / get_target_pos

Method get_target_pos

source/MaaWin32ControlUnit/Input/MessageInput.cpp:834–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834std::pair<int, int> MessageInput::get_target_pos() const
835{
836 if (last_pos_set_) {
837 return last_pos_;
838 }
839
840 // 未设置时返回窗口客户区中心
841 RECT rect = { };
842 if (hwnd_ && GetClientRect(hwnd_, &rect)) {
843 return { (rect.right - rect.left) / 2, (rect.bottom - rect.top) / 2 };
844 }
845 return { 0, 0 };
846}
847
848MaaControllerFeature MessageInput::get_features() const
849{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected