(&mut self, event: InputEvent)
| 159 | } |
| 160 | |
| 161 | pub fn push(&mut self, event: InputEvent) { |
| 162 | if self.capacity == 0 { |
| 163 | self.dropped_events = self.dropped_events.saturating_add(1); |
| 164 | return; |
| 165 | } |
| 166 | if self.events.len() == self.capacity { |
| 167 | self.events.pop_front(); |
| 168 | self.dropped_events = self.dropped_events.saturating_add(1); |
| 169 | } |
| 170 | self.events.push_back(event); |
| 171 | } |
| 172 | |
| 173 | pub fn seal_frame(&mut self) -> InputFrame { |
| 174 | let dropped = self.dropped_events; |