Index: Source/modules/gamepad/Gamepad.cpp |
diff --git a/Source/modules/gamepad/Gamepad.cpp b/Source/modules/gamepad/Gamepad.cpp |
index 05c65dcb8e8d33024f0d58ed8c6ad2e4c102d5a4..7f85cbb775f5f2895b663784e5e31e3ae5d390fe 100644 |
--- a/Source/modules/gamepad/Gamepad.cpp |
+++ b/Source/modules/gamepad/Gamepad.cpp |
@@ -29,6 +29,8 @@ |
namespace blink { |
Gamepad::Gamepad() |
+ : m_index(0) |
+ , m_timestamp(0) |
{ |
} |
@@ -36,6 +38,13 @@ Gamepad::~Gamepad() |
{ |
} |
+void Gamepad::setAxes(unsigned count, const double* data) |
+{ |
+ m_axes.resize(count); |
+ if (count) |
+ std::copy(data, data + count, m_axes.begin()); |
+} |
+ |
void Gamepad::setButtons(unsigned count, const WebGamepadButton* data) |
{ |
if (m_buttons.size() != count) { |