Index: public/platform/WebGamepad.h |
diff --git a/public/platform/WebGamepad.h b/public/platform/WebGamepad.h |
index b2f32da02f57a3a4ef1a03469f14e541e29605d3..6d079a035bfbbc6616b925415106c0cdcf4c30b3 100644 |
--- a/public/platform/WebGamepad.h |
+++ b/public/platform/WebGamepad.h |
@@ -30,6 +30,9 @@ |
#include "wtf/Assertions.h" |
#endif |
+// FIXME(cdumez): Remove once the Chromium side has been updated. |
+#define ENABLE_NEW_GAMEPAD_API 1 |
dmichael (off chromium)
2014/05/21 16:49:31
I don't think this is safe. You have Chromium code
|
+ |
namespace blink { |
#pragma pack(push, 1) |
@@ -38,16 +41,16 @@ class WebGamepadButton { |
public: |
WebGamepadButton() |
: pressed(false) |
- , value(0.f) |
+ , value(0.) |
{ |
} |
- WebGamepadButton(bool pressed, float value) |
+ WebGamepadButton(bool pressed, double value) |
: pressed(pressed) |
, value(value) |
{ |
} |
bool pressed; |
- float value; |
+ double value; |
}; |
// This structure is intentionally POD and fixed size so that it can be shared |
@@ -84,7 +87,7 @@ public: |
unsigned axesLength; |
// Normalized values representing axes, in the range [-1..1]. |
- float axes[axesLengthCap]; |
+ double axes[axesLengthCap]; |
// Number of valid entries in the buttons array. |
unsigned buttonsLength; |
@@ -97,7 +100,7 @@ public: |
}; |
#if BLINK_IMPLEMENTATION |
-COMPILE_ASSERT(sizeof(WebGamepad) == 529, WebGamepad_has_wrong_size); |
+COMPILE_ASSERT(sizeof(WebGamepad) == 721, WebGamepad_has_wrong_size); |
#endif |
#pragma pack(pop) |