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

Unified Diff: ppapi/examples/gamepad/gamepad.cc

Issue 1136463002: Pass correct length value in WebGamepads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed pending comments Created 5 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
Index: ppapi/examples/gamepad/gamepad.cc
diff --git a/ppapi/examples/gamepad/gamepad.cc b/ppapi/examples/gamepad/gamepad.cc
index d7f0053559c8f1214363321bad115632d3de394d..d2b08844ebed669de53dd6a9e5cdb794215c2ac0 100644
--- a/ppapi/examples/gamepad/gamepad.cc
+++ b/ppapi/examples/gamepad/gamepad.cc
@@ -79,8 +79,6 @@ class MyInstance : public pp::Instance {
device_context_.ReplaceContents(&image);
device_context_.Flush(
callback_factory_.NewCallback(&MyInstance::OnFlush));
- } else {
- printf("NullImage\n");
}
}
@@ -92,7 +90,7 @@ class MyInstance : public pp::Instance {
PP_GamepadsSampleData gamepad_data;
gamepad_->Sample(pp_instance(), &gamepad_data);
- if (gamepad_data.length > 1 && gamepad_data.items[0].connected) {
+ if (gamepad_data.length > 0 && gamepad_data.items[0].connected) {
int width2 = size.width() / 2;
int height2 = size.height() / 2;
// Draw 2 axes
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_win.cc ('k') | ppapi/shared_impl/ppb_gamepad_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698