MCPcopy Create free account
hub / github.com/JibbSmart/JoyShockMapper / moveMouse

Function moveMouse

JoyShockMapper/src/linux/InputHelpers.cpp:541–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539float accumulatedY = 0;
540
541void moveMouse(float x, float y)
542{
543 accumulatedX += x;
544 accumulatedY += y;
545
546 int applicableX = (int)accumulatedX;
547 int applicableY = (int)accumulatedY;
548
549 accumulatedX -= applicableX;
550 accumulatedY -= applicableY;
551
552 mouse.mouse_move_relative(applicableX, applicableY);
553 // printf("%0.4f %0.4f\n", accumulatedX, accumulatedY);
554}
555
556void setMouseNorm(float x, float y)
557{

Callers 2

processStickFunction · 0.50

Calls 1

mouse_move_relativeMethod · 0.80

Tested by

no test coverage detected