mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement WebXR Gamepads Module (#32860)
* Expose gamepad attribute on XRInputSource Signed-off-by: Daniel Adams <msub2official@gmail.com> * Tidy, add spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT test expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update gamepad state on InputChanged event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pin webxr commit Signed-off-by: Daniel Adams <msub2official@gmail.com> * Apply gamepad updates during frame updates Signed-off-by: Daniel Adams <msub2official@gmail.com> * Drain input frame map Signed-off-by: Daniel Adams <msub2official@gmail.com> * Don't store gamepad as option Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
parent
0672eca749
commit
fd83281657
8 changed files with 90 additions and 32 deletions
|
@ -92,6 +92,7 @@ impl Gamepad {
|
|||
global: &GlobalScope,
|
||||
gamepad_id: u32,
|
||||
id: String,
|
||||
mapping_type: String,
|
||||
axis_bounds: (f64, f64),
|
||||
button_bounds: (f64, f64),
|
||||
supported_haptic_effects: GamepadSupportedHapticEffects,
|
||||
|
@ -100,6 +101,7 @@ impl Gamepad {
|
|||
global,
|
||||
gamepad_id,
|
||||
id,
|
||||
mapping_type,
|
||||
axis_bounds,
|
||||
button_bounds,
|
||||
supported_haptic_effects,
|
||||
|
@ -115,6 +117,7 @@ impl Gamepad {
|
|||
global: &GlobalScope,
|
||||
gamepad_id: u32,
|
||||
id: String,
|
||||
mapping_type: String,
|
||||
axis_bounds: (f64, f64),
|
||||
button_bounds: (f64, f64),
|
||||
supported_haptic_effects: GamepadSupportedHapticEffects,
|
||||
|
@ -129,7 +132,7 @@ impl Gamepad {
|
|||
0,
|
||||
true,
|
||||
0.,
|
||||
String::from("standard"),
|
||||
mapping_type,
|
||||
&button_list,
|
||||
None,
|
||||
GamepadHand::_empty,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue