aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gamepad.rs
diff options
context:
space:
mode:
authorDaniel Adams <70986246+msub2@users.noreply.github.com>2024-08-03 02:51:44 -1000
committerGitHub <noreply@github.com>2024-08-03 12:51:44 +0000
commitfd832816572e26cafb8207d3710bd704f2617758 (patch)
treeb9238eae87bd7f43bf110f841fbb26175da9e5af /components/script/dom/gamepad.rs
parent0672eca7496bd54001e4625f7987d3e4053a3914 (diff)
downloadservo-fd832816572e26cafb8207d3710bd704f2617758.tar.gz
servo-fd832816572e26cafb8207d3710bd704f2617758.zip
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>
Diffstat (limited to 'components/script/dom/gamepad.rs')
-rw-r--r--components/script/dom/gamepad.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/gamepad.rs b/components/script/dom/gamepad.rs
index 951be3d05d5..4c4705d4db7 100644
--- a/components/script/dom/gamepad.rs
+++ b/components/script/dom/gamepad.rs
@@ -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,