| Index: ppapi/api/dev/ppb_gamepad_dev.idl
|
| diff --git a/ppapi/api/dev/ppb_gamepad_dev.idl b/ppapi/api/dev/ppb_gamepad_dev.idl
|
| index 8e6a4a9263b85f362f43b406e37a297c183abdc2..381b99497df3f81969ca875635490ff2e9272b48 100644
|
| --- a/ppapi/api/dev/ppb_gamepad_dev.idl
|
| +++ b/ppapi/api/dev/ppb_gamepad_dev.idl
|
| @@ -9,76 +9,76 @@
|
| */
|
|
|
| label Chrome {
|
| - M18 = 0.1
|
| + M19 = 0.1
|
| };
|
|
|
| -#inline c
|
| -#pragma pack(push, 1)
|
| -#endinl
|
| -
|
| /**
|
| * The data for one gamepad device.
|
| */
|
| -struct PP_GamepadData_Dev {
|
| +[assert_size(472)]
|
| +struct PP_GamepadSampleData_Dev {
|
| /**
|
| - * Is there a gamepad connected at this index? If this is false, no other
|
| - * data in this structure is valid.
|
| + * Number of valid elements in the |axes| array.
|
| */
|
| - char connected;
|
| + uint32_t axes_length;
|
|
|
| /**
|
| - * String identifier for the type of device/manufacturer.
|
| + * Normalized values for the axes, indices valid up to |axes_length|-1. Axis
|
| + * values range from -1..1, and are in order of "importance".
|
| */
|
| - uint16_t[128] id;
|
| + float_t[16] axes;
|
|
|
| /**
|
| - * Monotonically increasing value that is incremented when the data have
|
| - * been updated.
|
| + * Number of valid elements in the |buttons| array.
|
| */
|
| - uint64_t timestamp;
|
| + uint32_t buttons_length;
|
|
|
| /**
|
| - * Number of valid elements in the |axes| array.
|
| + * Normalized values for the buttons, indices valid up to |buttons_length|
|
| + * - 1. Button values range from 0..1, and are in order of importance.
|
| */
|
| - uint32_t axes_length;
|
| + float_t[32] buttons;
|
|
|
| /**
|
| - * Normalized values for the axes, indices valid up to |axesLength|-1. Axis
|
| - * values range from -1..1, and are in order of "importance".
|
| + * Monotonically increasing value that is incremented when the data have
|
| + * been updated.
|
| */
|
| - float_t[16] axes;
|
| + double_t timestamp;
|
|
|
| /**
|
| - * Number of valid elements in the |buttons| array.
|
| + * Identifier for the type of device/manufacturer.
|
| */
|
| - uint32_t buttons_length;
|
| + uint16_t[128] id;
|
|
|
| /**
|
| - * Normalized values for the buttons, indices valid up to |buttonsLength|
|
| - * - 1. Button values range from 0..1, and are in order of importance.
|
| + * Is there a gamepad connected at this index? If this is false, no other
|
| + * data in this structure is valid.
|
| */
|
| - float_t[32] buttons;
|
| + PP_Bool connected;
|
| +
|
| + /* Padding to make the struct the same size between 64 and 32. */
|
| + char[4] unused_pad_;
|
| };
|
|
|
| /**
|
| * The data for all gamepads connected to the system.
|
| */
|
| -struct PP_GamepadsData_Dev {
|
| +[assert_size(1896)]
|
| +struct PP_GamepadsSampleData_Dev {
|
| /**
|
| * Number of valid elements in the |items| array.
|
| */
|
| uint32_t length;
|
|
|
| + /* Padding to make the struct the same size between 64 and 32. */
|
| + char[4] unused_pad_;
|
| +
|
| /**
|
| * Data for an individual gamepad device connected to the system.
|
| */
|
| - PP_GamepadData_Dev[4] items;
|
| + PP_GamepadSampleData_Dev[4] items;
|
| };
|
|
|
| -#inline c
|
| -#pragma pack(pop)
|
| -#endinl
|
| -
|
| /**
|
| * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from
|
| * gamepad/joystick devices that are connected to the system.
|
| @@ -88,8 +88,8 @@ interface PPB_Gamepad_Dev {
|
| /**
|
| * Samples the current state of the connected gamepads.
|
| */
|
| - void SampleGamepads(
|
| + void Sample(
|
| [in] PP_Instance instance,
|
| - [out] PP_GamepadsData_Dev data);
|
| + [out] PP_GamepadsSampleData_Dev data);
|
|
|
| };
|
|
|