Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Add thumbstick support to controllers #28

Closed svillar closed 1 year ago

svillar commented 1 year ago

Map data coming from axis to device::Gamepad axes. The code defines a deadZone under which the thumbstick value is considered 0 as done in other parts of the code.

Apart from that we're adding a couple of DCHECKs for the amount of buttons and axis coming from Wolvic. They replace an if condition as it should never really happen.

svillar commented 1 year ago

A good test for the feature. Without this patch we don't get a second row of boxes. With the patch we get that second row. One of the boxes moves around as we move the thumbstick.