MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Input_RemoveTouch

Function Input_RemoveTouch

src/Input.c:100–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98void Input_UpdateTouch(long id, int x, int y) { TryUpdateTouch(id, x, y); }
99
100void Input_RemoveTouch(long id, int x, int y) {
101 int i;
102 for (i = 0; i < Pointers_Count; i++) {
103 if (touches[i].id != id || !touches[i].type) continue;
104
105 Pointer_SetPosition(i, x, y);
106 Pointer_SetPressed(i, false);
107
108 /* found the touch, remove it */
109 Pointer_SetPosition(i, -100000, -100000);
110 touches[i].type = 0;
111
112 if ((i + 1) == Pointers_Count) Pointers_Count--;
113 return;
114 }
115}
116#else
117static void ClearTouches(void) { }
118#endif

Callers 9

Window_ProcedureFunction · 0.85
OnTouchEndFunction · 0.85
ProcessTouchInputFunction · 0.85
ProcessTouchInputFunction · 0.85
java_processPointerUpFunction · 0.85
ProcessTouchInputFunction · 0.85
Window_ProcessEventsFunction · 0.85
ProcessTouchInputFunction · 0.85
ProcessVpadTouchFunction · 0.85

Calls 2

Pointer_SetPositionFunction · 0.85
Pointer_SetPressedFunction · 0.85

Tested by

no test coverage detected