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

Unified Diff: native_client_sdk/src/examples/gamepad/gamepad.cc

Issue 9405033: Revise gamepad interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « no previous file | ppapi/api/dev/ppb_gamepad_dev.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/gamepad/gamepad.cc
diff --git a/native_client_sdk/src/examples/gamepad/gamepad.cc b/native_client_sdk/src/examples/gamepad/gamepad.cc
index c288b8b84482b0a42b12ed6ac2318e898543b2b2..9ee653ef7bbf47fba4b0e227f96a1076003e0ea3 100644
--- a/native_client_sdk/src/examples/gamepad/gamepad.cc
+++ b/native_client_sdk/src/examples/gamepad/gamepad.cc
@@ -10,6 +10,7 @@
#include <cmath>
#include <cstring>
#include <string>
+#include "ppapi/c/dev/ppb_gamepad_dev.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/var.h"
@@ -83,15 +84,15 @@ void Gamepad::Paint() {
FillRect(pixel_buffer_, 0, 0, width(), height(), 0xfff0f0f0);
// Get current gamepad data.
- PP_GamepadsData_Dev gamepad_data;
- gamepad_->SampleGamepads(pp_instance(), &gamepad_data);
+ PP_GamepadsSampleData_Dev gamepad_data;
+ gamepad_->Sample(pp_instance(), &gamepad_data);
// Draw the current state for each connected gamepad.
for (size_t p = 0; p < gamepad_data.length; ++p) {
int width2 = width() / gamepad_data.length / 2;
int height2 = height() / 2;
int offset = width2 * 2 * p;
- PP_GamepadData_Dev& pad = gamepad_data.items[p];
+ PP_GamepadSampleData_Dev& pad = gamepad_data.items[p];
if (!pad.connected)
continue;
« no previous file with comments | « no previous file | ppapi/api/dev/ppb_gamepad_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698