()
| 2271 | } |
| 2272 | |
| 2273 | function flushPendingControlMove() { |
| 2274 | const pending = pendingControlMoveRef.current; |
| 2275 | pendingControlMoveRef.current = null; |
| 2276 | if (controlMoveFrameRef.current) { |
| 2277 | window.cancelAnimationFrame(controlMoveFrameRef.current); |
| 2278 | controlMoveFrameRef.current = 0; |
| 2279 | } |
| 2280 | if (!pending) { |
| 2281 | return; |
| 2282 | } |
| 2283 | sendControlNow(pending.udid, pending.message); |
| 2284 | } |
| 2285 | |
| 2286 | function sendControlNow(udid: string, message: ControlMessage): boolean { |
| 2287 | setLocalError(""); |
no test coverage detected