@@ -117,17 +117,30 @@ GamepadPlatformService::RemoveGamepad(uint32_t aIndex)
117117
118118void
119119GamepadPlatformService::NewButtonEvent (uint32_t aIndex, uint32_t aButton,
120- bool aPressed, double aValue)
120+ bool aPressed, bool aTouched,
121+ double aValue)
121122{
122123 // This method is called by monitor thread populated in
123124 // platform-dependent backends
124125 MOZ_ASSERT (XRE_IsParentProcess ());
125126 MOZ_ASSERT (!NS_IsMainThread());
126127 GamepadButtonInformation a (aIndex, GamepadServiceType::Standard,
127- aButton, aPressed, aValue );
128+ aButton, aValue, aPressed, aTouched );
128129 NotifyGamepadChange<GamepadButtonInformation>(a);
129130}
130131
132+ void
133+ GamepadPlatformService::NewButtonEvent (uint32_t aIndex, uint32_t aButton,
134+ bool aPressed, bool aTouched)
135+ {
136+ // This method is called by monitor thread populated in
137+ // platform-dependent backends
138+ MOZ_ASSERT (XRE_IsParentProcess ());
139+ MOZ_ASSERT (!NS_IsMainThread());
140+ // When only a digital button is available the value will be synthesized.
141+ NewButtonEvent (aIndex, aButton, aPressed, aTouched, aPressed ? 1 .0L : 0 .0L );
142+ }
143+
131144void
132145GamepadPlatformService::NewButtonEvent (uint32_t aIndex, uint32_t aButton,
133146 bool aPressed)
@@ -137,7 +150,7 @@ GamepadPlatformService::NewButtonEvent(uint32_t aIndex, uint32_t aButton,
137150 MOZ_ASSERT (XRE_IsParentProcess ());
138151 MOZ_ASSERT (!NS_IsMainThread());
139152 // When only a digital button is available the value will be synthesized.
140- NewButtonEvent (aIndex, aButton, aPressed, aPressed ? 1 .0L : 0 .0L );
153+ NewButtonEvent (aIndex, aButton, aPressed, aPressed, aPressed ? 1 .0L : 0 .0L );
141154}
142155
143156void
0 commit comments