Index: ppapi/c/ppb_gamepad.h |
diff --git a/ppapi/c/ppb_gamepad.h b/ppapi/c/ppb_gamepad.h |
index 4beb9b8f1f8599bdc5e720d47633670f16564d9f..13d5195899d1e3114be117d490917f898cd33a19 100644 |
--- a/ppapi/c/ppb_gamepad.h |
+++ b/ppapi/c/ppb_gamepad.h |
@@ -3,7 +3,7 @@ |
* found in the LICENSE file. |
*/ |
-/* From ppb_gamepad.idl modified Tue Apr 16 09:04:34 2013. */ |
+/* From ppb_gamepad.idl modified Sun Feb 9 16:16:26 2014. */ |
#ifndef PPAPI_C_PPB_GAMEPAD_H_ |
#define PPAPI_C_PPB_GAMEPAD_H_ |
@@ -28,6 +28,21 @@ |
* @{ |
*/ |
/** |
+ * The data for one gamepad button. |
+ */ |
+struct PP_GamepadButtonSampleData { |
+ /** |
+ * Is the button pressed? |
+ */ |
+ PP_Bool pressed; |
+ /** |
+ * Normalized button value, in the range [0..1]. |
+ */ |
+ float value; |
+}; |
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadButtonSampleData, 8); |
+ |
+/** |
* The data for one gamepad device. |
*/ |
struct PP_GamepadSampleData { |
@@ -48,7 +63,7 @@ struct PP_GamepadSampleData { |
* Normalized values for the buttons, indices valid up to |buttons_length| |
* - 1. Button values range from 0..1, and are in order of importance. |
*/ |
- float buttons[32]; |
+ struct PP_GamepadButtonSampleData buttons[32]; |
/** |
* Monotonically increasing value that is incremented when the data have |
* been updated. |
@@ -59,6 +74,10 @@ struct PP_GamepadSampleData { |
*/ |
uint16_t id[128]; |
/** |
+ * Mapping type (for example "standard") |
+ */ |
+ uint16_t mapping[16]; |
+ /** |
* Is there a gamepad connected at this index? If this is false, no other |
* data in this structure is valid. |
*/ |
@@ -66,7 +85,7 @@ struct PP_GamepadSampleData { |
/* Padding to make the struct the same size between 64 and 32. */ |
char unused_pad_[4]; |
}; |
-PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData, 472); |
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData, 632); |
/** |
* The data for all gamepads connected to the system. |
@@ -83,7 +102,7 @@ struct PP_GamepadsSampleData { |
*/ |
struct PP_GamepadSampleData items[4]; |
}; |
-PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData, 1896); |
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData, 2536); |
/** |
* @} |
*/ |