mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/vive: Fix build on Android NDK by switching byte order utilities.
This commit is contained in:
parent
974c68dead
commit
cb3096128a
|
@ -553,8 +553,8 @@ controller_handle_buttons(struct vive_controller_device *d, uint8_t buttons)
|
|||
static void
|
||||
controller_handle_touch_position(struct vive_controller_device *d, uint8_t *buf)
|
||||
{
|
||||
int16_t x = __le16_to_cpup((__le16 *)buf);
|
||||
int16_t y = __le16_to_cpup((__le16 *)(buf + 2));
|
||||
int16_t x = __le16_to_cpu(*(__le16 *)buf);
|
||||
int16_t y = __le16_to_cpu(*(__le16 *)(buf + 2));
|
||||
d->state.trackpad.x = (float)x / INT16_MAX;
|
||||
d->state.trackpad.y = (float)y / INT16_MAX;
|
||||
if (d->state.trackpad.x != 0 || d->state.trackpad.y != 0)
|
||||
|
|
Loading…
Reference in a new issue