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

Function skipmousemotion

source/src/main.cpp:804–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804static inline bool skipmousemotion(SDL_Event &event)
805{
806 if(event.type != SDL_MOUSEMOTION) return true;
807 if(!(SDL_GetWindowFlags(screen) & SDL_WINDOW_FULLSCREEN))
808 {
809 if(event.motion.x == screenw / 2 && event.motion.y == screenh / 2) return true; // ignore any motion events generated SDL_WarpMouse
810 }
811 return false;
812}
813
814static void checkmousemotion(int &dx, int &dy)
815{

Callers 3

loopvFunction · 0.85
checkmousemotionFunction · 0.85
checkinputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected