(&mut self)
| 218 | } |
| 219 | } |
| 220 | |
| 221 | fn find_gamepad_id_by_index(&self, index: usize) -> Option<GamepadId> { |
| 222 | for (id, uuid) in &self.id_to_uuid { |
| 223 | if self.uuid_to_index.get(uuid).copied() == Some(index) { |
| 224 | return Some(*id); |
| 225 | } |
| 226 | } |
| 227 | None |
| 228 | } |
| 229 | |
| 230 | fn ensure_gilrs(&mut self) { |