mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Gamepad: Remove GamepadList and fix dropped connection event on startup (#31684)
* Replace GamepadList * Fix initial gamepad connection event from gilrs getting dropped * Fix gamepad reconnection issues, use MutNullableDom * Reduce some repetition in handle_gamepad_events * Address feedback, move some steps to navigator methods * Refactor internal navigator gamepad methods * Add note re: unused gilrs index, adjust navigator gamepad methods
This commit is contained in:
parent
ddbec46e1f
commit
e38b34a629
8 changed files with 91 additions and 146 deletions
|
@ -199,6 +199,10 @@ impl Gamepad {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn index(&self) -> i32 {
|
||||
self.index.get()
|
||||
}
|
||||
|
||||
pub fn update_index(&self, index: i32) {
|
||||
self.index.set(index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue