Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: trunk/public/platform/WebGamepad.h

Issue 296723005: Revert 174428 "Update Gamepad.axes / GamepadButton.value to matc..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/Source/modules/gamepad/GamepadCommon.cpp ('k') | trunk/public/platform/WebGamepads.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/public/platform/WebGamepad.h
===================================================================
--- trunk/public/platform/WebGamepad.h (revision 174432)
+++ trunk/public/platform/WebGamepad.h (working copy)
@@ -30,9 +30,6 @@
#include "wtf/Assertions.h"
#endif
-// FIXME(cdumez): Remove once the Chromium side has been updated.
-#define ENABLE_NEW_GAMEPAD_API 1
-
namespace blink {
#pragma pack(push, 1)
@@ -41,16 +38,16 @@
public:
WebGamepadButton()
: pressed(false)
- , value(0.)
+ , value(0.f)
{
}
- WebGamepadButton(bool pressed, double value)
+ WebGamepadButton(bool pressed, float value)
: pressed(pressed)
, value(value)
{
}
bool pressed;
- double value;
+ float value;
};
// This structure is intentionally POD and fixed size so that it can be shared
@@ -87,7 +84,7 @@
unsigned axesLength;
// Normalized values representing axes, in the range [-1..1].
- double axes[axesLengthCap];
+ float axes[axesLengthCap];
// Number of valid entries in the buttons array.
unsigned buttonsLength;
@@ -100,7 +97,7 @@
};
#if BLINK_IMPLEMENTATION
-COMPILE_ASSERT(sizeof(WebGamepad) == 721, WebGamepad_has_wrong_size);
+COMPILE_ASSERT(sizeof(WebGamepad) == 529, WebGamepad_has_wrong_size);
#endif
#pragma pack(pop)
« no previous file with comments | « trunk/Source/modules/gamepad/GamepadCommon.cpp ('k') | trunk/public/platform/WebGamepads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698