mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
chore: Add trace log for scaled coordinates in ControlScaleProxy click & swipe
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "ControlScaleProxy.h"
|
||||
|
||||
#include "Config/GeneralConfig.h"
|
||||
#include "Utils/Logger.hpp"
|
||||
|
||||
asst::ControlScaleProxy::ControlScaleProxy(std::shared_ptr<ControllerAPI> controller, ControllerType controller_type,
|
||||
ProxyCallback proxy_callback)
|
||||
@@ -56,6 +57,8 @@ bool asst::ControlScaleProxy::click(const Point& p)
|
||||
int x = static_cast<int>(p.x * m_control_scale);
|
||||
int y = static_cast<int>(p.y * m_control_scale);
|
||||
|
||||
Log.trace("Click with scaled coordinates", p, m_control_scale);
|
||||
|
||||
return m_controller->click(Point(x, y));
|
||||
}
|
||||
|
||||
@@ -72,6 +75,8 @@ bool asst::ControlScaleProxy::swipe(const Point& p1, const Point& p2, int durati
|
||||
int x2 = static_cast<int>(p2.x * m_control_scale);
|
||||
int y2 = static_cast<int>(p2.y * m_control_scale);
|
||||
|
||||
Log.trace("Swipe with scaled coordinates", p1, p2, m_control_scale);
|
||||
|
||||
return m_controller->swipe(Point(x1, y1), Point(x2, y2), duration, extra_swipe, slope_in, slope_out, with_pause);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user