Index: Source/modules/gamepad/GamepadCommon.cpp |
diff --git a/Source/modules/gamepad/GamepadCommon.cpp b/Source/modules/gamepad/GamepadCommon.cpp |
index bab5498cce811152f829b12ba94ade8b99e8e00c..264c6b7da0f202f1b40fd6021c80eb1adad9e10f 100644 |
--- a/Source/modules/gamepad/GamepadCommon.cpp |
+++ b/Source/modules/gamepad/GamepadCommon.cpp |
@@ -38,11 +38,20 @@ GamepadCommon::~GamepadCommon() |
{ |
} |
-void GamepadCommon::setAxes(unsigned count, const float* data) |
+#if defined(ENABLE_NEW_GAMEPAD_API) |
+void GamepadCommon::setAxes(unsigned count, const double* data) |
{ |
m_axes.resize(count); |
if (count) |
std::copy(data, data + count, m_axes.begin()); |
} |
+#else |
+void GamepadCommon::setAxes(unsigned count, const float* data) |
+{ |
+ m_axes.resize(count); |
+ for (unsigned i = 0; i < count; ++i) |
+ m_axes[i] = data[i]; |
+} |
+#endif |
} // namespace WebCore |