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

Unified Diff: content/browser/gamepad/gamepad_standard_mappings_linux.cc

Issue 165983005: Updating Gamepad API to match latest spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in GamepadProviderTest Created 6 years, 10 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
Index: content/browser/gamepad/gamepad_standard_mappings_linux.cc
diff --git a/content/browser/gamepad/gamepad_standard_mappings_linux.cc b/content/browser/gamepad/gamepad_standard_mappings_linux.cc
index 08104dcd094fc61de61118fe83ec72a78938b405..86c3afde8a15399e136b0f8c5f8ea1a59d8ec515 100644
--- a/content/browser/gamepad/gamepad_standard_mappings_linux.cc
+++ b/content/browser/gamepad/gamepad_standard_mappings_linux.cc
@@ -4,24 +4,10 @@
#include "content/browser/gamepad/gamepad_standard_mappings.h"
-#include "content/common/gamepad_hardware_buffer.h"
-
namespace content {
namespace {
-float AxisToButton(float input) {
- return (input + 1.f) / 2.f;
-}
-
-float AxisNegativeAsButton(float input) {
- return (input < -0.5f) ? 1.f : 0.f;
-}
-
-float AxisPositiveAsButton(float input) {
- return (input > 0.5f) ? 1.f : 0.f;
-}
-
void MapperXInputStyleGamepad(
const blink::WebGamepad& input,
blink::WebGamepad* mapped) {
« no previous file with comments | « content/browser/gamepad/gamepad_standard_mappings.cc ('k') | content/browser/gamepad/gamepad_standard_mappings_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698