Index: trunk/public/platform/WebGamepad.h |
=================================================================== |
--- trunk/public/platform/WebGamepad.h (revision 167540) |
+++ trunk/public/platform/WebGamepad.h (working copy) |
@@ -34,29 +34,12 @@ |
#pragma pack(push, 1) |
-class WebGamepadButton { |
-public: |
- WebGamepadButton() |
- : pressed(false) |
- , value(0.f) |
- { |
- } |
- WebGamepadButton(bool pressed, float value) |
- : pressed(pressed) |
- , value(value) |
- { |
- } |
- bool pressed; |
- float value; |
-}; |
- |
// This structure is intentionally POD and fixed size so that it can be shared |
// memory between hardware polling threads and the rest of the browser. See |
// also WebGamepads.h. |
class WebGamepad { |
public: |
static const size_t idLengthCap = 128; |
- static const size_t mappingLengthCap = 16; |
static const size_t axesLengthCap = 16; |
static const size_t buttonsLengthCap = 32; |
@@ -67,7 +50,6 @@ |
, buttonsLength(0) |
{ |
id[0] = 0; |
- mapping[0] = 0; |
} |
// Is there a gamepad connected at this index? |
@@ -89,15 +71,12 @@ |
// Number of valid entries in the buttons array. |
unsigned buttonsLength; |
- // Button states |
- WebGamepadButton buttons[buttonsLengthCap]; |
- |
- // Mapping type (for example "standard") |
- WebUChar mapping[mappingLengthCap]; |
+ // Normalized values representing buttons, in the range [0..1]. |
+ float buttons[buttonsLengthCap]; |
}; |
#if BLINK_IMPLEMENTATION |
-COMPILE_ASSERT(sizeof(WebGamepad) == 529, WebGamepad_has_wrong_size); |
+COMPILE_ASSERT(sizeof(WebGamepad) == 465, WebGamepad_has_wrong_size); |
#endif |
#pragma pack(pop) |