MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / touch_finger_do_mouse_motion

Method touch_finger_do_mouse_motion

src/InputManager.cpp:719–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719void InputManager::touch_finger_do_mouse_motion(const SDL_TouchFingerEvent& e) {
720 Vector2f mouseNewPos = backend_touch_cursor_pos_calculation({e.x, e.y});
721 mouse.set_pos(mouseNewPos);
722 Vector2f mouseRel = backend_touch_cursor_delta_calculation({e.dx, e.dy});
723 main.input_mouse_motion_callback({
724 .deviceType = MouseDeviceType::TOUCH,
725 .pos = mouseNewPos,
726 .move = mouseRel
727 });
728}
729
730void InputManager::backend_touch_finger_down_update(const SDL_TouchFingerEvent& e) {
731 touch.fingers.emplace_back(e);

Callers

nothing calls this directly

Calls 2

set_posMethod · 0.80

Tested by

no test coverage detected