MCPcopy Create free account
hub / github.com/assaultcube/AC / checkmousemotion

Function checkmousemotion

source/src/main.cpp:814–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812}
813
814static void checkmousemotion(int &dx, int &dy)
815{
816 loopv(events)
817 {
818 SDL_Event &event = events[i];
819 if(skipmousemotion(event))
820 {
821 if(i > 0) events.remove(0, i);
822 return;
823 }
824 dx += event.motion.xrel;
825 dy += event.motion.yrel;
826 }
827 events.setsize(0);
828 SDL_Event event;
829 while(SDL_PollEvent(&event))
830 {
831 if(skipmousemotion(event))
832 {
833 events.add(event);
834 return;
835 }
836 dx += event.motion.xrel;
837 dy += event.motion.yrel;
838 }
839}
840
841int ignoremouse = 5, bootstrapentropy = 2;
842#define EVENTDEBUG(x) x

Callers 1

checkinputFunction · 0.85

Calls 3

skipmousemotionFunction · 0.85
setsizeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected