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

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

Issue 625543002: Revert of Use the new java_cpp_enum rule in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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.cc
diff --git a/content/browser/gamepad/gamepad_standard_mappings.cc b/content/browser/gamepad/gamepad_standard_mappings.cc
index 687d4ce154d5e6a0303a9b64b9210bef65aa5da8..7f159e1ac8fd14f45aa3d17dabc260824b2d580f 100644
--- a/content/browser/gamepad/gamepad_standard_mappings.cc
+++ b/content/browser/gamepad/gamepad_standard_mappings.cc
@@ -51,14 +51,14 @@
left = dir >= .4f && dir <= 1.f;
}
- mapped->buttons[BUTTON_INDEX_DPAD_UP].pressed = up;
- mapped->buttons[BUTTON_INDEX_DPAD_UP].value = up ? 1.f : 0.f;
- mapped->buttons[BUTTON_INDEX_DPAD_RIGHT].pressed = right;
- mapped->buttons[BUTTON_INDEX_DPAD_RIGHT].value = right ? 1.f : 0.f;
- mapped->buttons[BUTTON_INDEX_DPAD_DOWN].pressed = down;
- mapped->buttons[BUTTON_INDEX_DPAD_DOWN].value = down ? 1.f : 0.f;
- mapped->buttons[BUTTON_INDEX_DPAD_LEFT].pressed = left;
- mapped->buttons[BUTTON_INDEX_DPAD_LEFT].value = left ? 1.f : 0.f;
+ mapped->buttons[kButtonDpadUp].pressed = up;
+ mapped->buttons[kButtonDpadUp].value = up ? 1.f : 0.f;
+ mapped->buttons[kButtonDpadRight].pressed = right;
+ mapped->buttons[kButtonDpadRight].value = right ? 1.f : 0.f;
+ mapped->buttons[kButtonDpadDown].pressed = down;
+ mapped->buttons[kButtonDpadDown].value = down ? 1.f : 0.f;
+ mapped->buttons[kButtonDpadLeft].pressed = left;
+ mapped->buttons[kButtonDpadLeft].value = left ? 1.f : 0.f;
}
} // namespace content
« no previous file with comments | « content/browser/gamepad/gamepad_standard_mappings.h ('k') | content/browser/gamepad/gamepad_standard_mappings_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698